Posted By

kamilch on 08/18/10


Tagged


Versions (?)

Disable constraints for child tables


 / Published in: SQL
 

  1. SELECT
  2. 'ALTER TABLE '||TABLE_NAME||' DISABLE CONSTRAINTS '||CONSTRAINT_NAME||';'
  3. FROM
  4. user_constraints
  5. WHERE
  6. r_constraint_name =
  7. (SELECT constraint_name FROM user_constraints WHERE
  8. lower(table_name) = 'parent_table' AND constraint_type = 'P')
  9. AND constraint_type = 'R'
  10. ;

Report this snippet  

You need to login to post a comment.