Hi lists

can anybody post me this query:

I need to generate a dynamic sql that will create a statement to add a
constraint of composite primary key .

 alter table xyz add constriant xyz_comp_pk (col1,col2,col3....);

when I generated this from dba_cons_columns i am getting the flwng:

alter table xyz add constriant xyz_comp_pk (col1);
alter table xyz add constriant xyz_comp_pk (col2);
alter table xyz add constriant xyz_comp_pk (col3);

so 2,3 will automatically fail. only first will be generated as a table
should have only 1 PK.


srinivas






-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Tatireddy, Shrinivas (MED, Keane)
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to