Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> dyn sql

dyn sql

From: Tatireddy, Shrinivas (MED, Keane) <Shrinivas.Tatireddy_at_med.ge.com>
Date: Fri, 24 Aug 2001 08:43:39 -0700
Message-ID: <F001.00376F8C.20010824083105@fatcity.com>

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: Shrinivas.Tatireddy_at_med.ge.com

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: ListGuru_at_fatcity.com (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). Received on Fri Aug 24 2001 - 10:43:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US