Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle table creation script question
TC wrote:
>
> Hi,
>
> I have a table creation script in hand (written by another guy), and
> I'm trying to figure out why exactly the primary keys are created as
> they are:
>
> For each table, the following sequence of steps is performed:
>
> 1) The table is defined, except that no column is designated as the
> PK.
> 2) A unique index is created on a column (the PK-designate).
> 3) An ALTER TABLE ADD CONSTRAINT command is issued to add the PK
> constraint on that column.
>
> Can someone comment on the benefits of doing things this way? Full
> storage parameters are included in steps 1 & 2, if that helps.
>
> Thanks for any assistance,
> Tom C.
Hi Tom,
I don't see any advantages in this way, only disadvantages like Daniel already said.
But can it be that this script is generated by a program, which follows some simple rules: first the tables, then the related indexes, then the related constraints ?
Peter Received on Wed Jun 13 2001 - 01:19:56 CDT