Disable Constraints & Enable Constraints

 Disable Constraints & Enable Constraints :

===============================


DISABLE:

select 'alter table '||owner||'.'||table_name||' disable constraint '||constraint_name||';' from user_constraints;


SQL> alter table TABLE_NAME disable constraint CONSTRAINT_NAME;

SQL> alter table TABLE_NAME disable constraint CONSTRAINT_NAME cascade;


ENABLE:


select 'alter table '||owner||'.'||table_name||' enable constraint '||constraint_name||';' from user_constraints;

SQL> alter table TABLE_NAME enable constraint CONSTRAINT_NAME;

Comments

Popular posts from this blog

SQL Tuning Task Creation ORA-13780: SQL statement does not exist.

Shareplex some commands

ORA-1092 : opitsk aborting process