Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: I don't know the difference of using index clause and just constraint clause
victor_at_shinsegae.com (Victor Min) wrote in message news:<d30a1319.0108162021.a40d2fa_at_posting.google.com>...
> Hi.. there..
> I don't know the difference of 'using index' clause and just primary
> key constraint...
>
> detail...
> 1.Create Table testtable(
> test number(4) constraint ...primary key
> using index ....
> ...)
> =>create a unique index for primary key...(it's explicit)
> 2.Create Table testtable(
> test number(4) constraint ... primary key
> ..)=>create a unique index for primary key...(it's implicit & not
> use 'using index clause)
>
> pls..let's me know the difference of No.1 and No.2
The using index tablespace clause tells Oracle where to build the index and allows specifing storage parameters. In example number 2 the PK index will be build in the same tablespace as the table, which is usually not desirable from an object/space management point of view.
The best source in the documentation may be the Concepts manual chapter where constraints are covered.