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.