From JTESTA@longaberger.com Fri, 24 Aug 2001 08:46:27 -0700 From: "JOE TESTA" Date: Fri, 24 Aug 2001 08:46:27 -0700 Subject: Re: dyn sql Message-ID: MIME-Version: 1.0 Content-Type: text/plain i'd just got a piece of code from metalstink the other day that will generate the constraints on a table for you into sql code.   if you want it let me know and i'll email it to ya(its really too big for the list).   joe >>> Shrinivas.Tatireddy@med.ge.com 08/24/01 12:31PM >>>Hi listscan anybody post me this query:I need to generate a dynamic sql that will create a statement to add aconstraint 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 tableshould have only 1 PK.srinivas-- Please see the official ORACLE-L FAQ: http://www.orafaq.com-- Author: Tatireddy, Shrinivas (MED, Keane)  INET: Shrinivas.Tatireddy@med.ge.comFat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051San Diego, California        -- Public Internet access / Mailing Lists--------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from).  You mayalso send the HELP command for other information (like subscribing).