Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: dyn sql
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_at_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: <A
href="http://www.orafaq.com">http://www.orafaq.com-- Author:
Tatireddy, Shrinivas (MED, Keane) INET:
Shrinivas.Tatireddy_at_med.ge.comFat City Network
Services -- (858) 538-5051 FAX: (858) 538-5051San
Diego, California -- Public Internet
access / Mailing
Lists--------------------------------------------------------------------ToREMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru_at_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). Received on Fri Aug 24 2001 - 10:46:27 CDT
![]() |
![]() |