|
-
You can try this:
set feedback off
set heading off
set echo off
set pagesize 0
set trimspool on
set linesize 132
spool disable_cons.sql
select 'alter table '||table_name|| ' disable constraint ' || constraint_name || ' cascade;'
from dba_constraints
where owner = 'SCOTT' and status = 'ENABLED' and constraint_type = 'P'
order by TABLE_NAME desc
/
spool off
set feedback on
set heading on
set trimspool off
@disable_cons.sql
Hope this helps.
Nagesh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|