Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: set defaults for $1?
In article <3A30C73C.A705CE84_at_informationsdesign.de>,
j_at_nhaase.de wrote:
> Hi.
>
> I've got a problem using Oracle 8:
>
> I want an index to be created with a size given on command line to the
.sql-script. It looks like this:
>
> foo.sql:
> create index index1 on table1 (column1)
> tablespace ts1
> pctfree 4
> storage (initial $1 next $2)
> unrecoverable;
>
> But what can I do if a user forgets to provide this size on command
line? Is there any possibility to set a default if $1 is empty?
>
> Thanks for any hints,
>
> Jan
>
Hiya Jan,
I'm not sure I understand what you're asking, so let me know if I'm off
base on my answer here 'k?
The user doesn't interact with an index at all..it's a 'behind the
scenes' kind of thing..certain commands have a 'USE INDEX' clause but I
don't think that's what you're asking about. The storage clause just
specifies that the index will be allocated $1 space in storage initially
and when that fills up, and additional extent of $2 will be allocated.
There's nothing required on the command line by the user.
Your script will create an index on column1 of table1 which will then be used under certain circumstances when selecting from that table. Please feel free to email me if you want to discuss this in more detail.
Best regards,
Steve
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Dec 08 2000 - 06:56:06 CST
![]() |
![]() |