Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Drop the Column getting error

suman amaraAug 18 2014 — edited Aug 19 2014

Hi Team ,

I am dropping the column i am getting the error constraint issue , i have different environments like Schema1 and Schema 2 and so on

and Constraint name also different ..

DECLARE

--

  BEGIN

  --

      EXECUTE IMMEDIATE 'ALTER TABLE GE_SUB_ALLOWED_GIFTS DROP COLUMN GIFT_ID';

  --

  EXCEPTION WHEN OTHERS THEN

      IF SQLCODE = '-00904'   THEN

         NULL ;

      ELSE

         RAISE ;

      END IF ;     

--

END ;

Error report -

ORA-12991: column is referenced in a multi-column constraint

ORA-06512: at line 11

12991. 00000 -  "column is referenced in a multi-column constraint"

*Cause:    An attempt was made to drop a column referenced by some

           constraints.

*Action:   Drop all constraints referencing the dropped column or

           specify CASCADE CONSTRAINTS in statement.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2014
Added on Aug 18 2014
4 comments
1,341 views