Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: OCP preparation...
Richard,
If you read the manual (9.2 SQL Ref, Alter Table) you will find that the tram tracks show quite clearly that
alter table T1 modify (n1 constraint t1_pk primary key);
is perfectly valid syntax for modifying a column to add an inline constraint (see p7-7 for inline constraints).
The fact that this does not work in practice is totally irrelevant - it works in theory.
-- Regards Jonathan Lewis http://www.jlcomp.demon.co.uk Coming soon one-day tutorials: Cost Based Optimisation Trouble-shooting and Tuning Indexing Strategies (see http://www.jlcomp.demon.co.uk/tutorial.html ) ____UK_______March 19th ____USA_(FL)_May 2nd Next Seminar dates: (see http://www.jlcomp.demon.co.uk/seminar.html ) ____USA_(CA, TX)_August The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Richard Foote wrote in message ...Received on Thu Feb 13 2003 - 05:56:48 CST
>"Lukasz Feldman" <lukasz_at_atm.com.pl> wrote in message
>> alter table modify (column_name constraint constraint_name primary
key)
>> statement"
>>
>> In my opinion based on SQLPlus practice experience alter table
modify
>> command shouldn't be used for adding primary key even as a column
>> constraint. Am I right? Maybe I missed something...
>
>No, you're not missing anything.
>I too would like to see how one adds a PK by modifying a column.
>