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

Home -> Community -> Usenet -> c.d.o.server -> Re: Drop constraint in PL@SQL

Re: Drop constraint in PL@SQL

From: Marc Blum <blum_at_marcblum.de>
Date: Wed, 05 Nov 2003 20:00:06 +0100
Message-ID: <u3iiqvo0gr0huefb519b3f80ih88rs64nv@4ax.com>


ups..been to fast, should be:

DECLARE
   cursor cur
   IS
   SELECT TABLE_NAME,

                  CONSTRAINT_NAME 

   FROM USER_CONSTRAINTS;    l_sql varchar2(1234);

BEGIN
   FOR rec IN cur
   LOOP

      my_sql :=  ' ALTER TABLE ' ||  rec.table_name || 
                      ' DROP CONSTRAINT ' || rec.constraint_name ;
   
      execute immediate l_sql;

   END LOOP;
END;
/ Received on Wed Nov 05 2003 - 13:00:06 CST

Original text of this message

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