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 -> Drop constraint in PL@SQL

Drop constraint in PL@SQL

From: MaisonBorniol <maisonborniol_at_nomade.fr>
Date: 5 Nov 2003 10:29:11 -0800
Message-ID: <29f4fc84.0311051029.10ce747a@posting.google.com>


All,

Could someone tell me why the code following doesn't work ?

It is not possible to drop a table in a PL_at_SQL Loop ?

Any help would be appreciated,Tx !

DECLARE
  cursor C1 IS SELECT TABLE_NAME, CONSTRAINT_NAME FROM USER_CONSTRAINTS;   v_table_name USER_CONSTRAINTS.TABLE_NAME%type;   v_constraint_name USER_CONSTRAINTS.CONSTRAINT_NAME%type;

BEGIN
 OPEN C1;
 LOOP
   FETCH C1 INTO v_table_name, v_constraint_name;    EXIT WHEN (C1%NOTFOUND);    ALTER TABLE v_table_name DROP CONSTRAINT v_constraint_name;   

 END LOOP;
 CLOSE C1;
END; Received on Wed Nov 05 2003 - 12:29:11 CST

Original text of this message

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