Home » SQL & PL/SQL » SQL & PL/SQL » How to drop all constraints on a schema at once?
|
|
|
|
|
|
|
Re: How to drop all constraints on a schema at once? [message #275073 is a reply to message #275020] |
Thu, 18 October 2007 04:05   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Or you can remove the reference to user_tables entirely, and have this:select 'alter table '|| c.table_name ||' drop constraint ' ||c.constraint_name||';'
from user_constraints c;
It'll even have trailing ';' on the commands, so that SQL*Plus will execute them
|
|
|
|
|
|
Goto Forum:
Current Time: Sat May 17 16:05:33 CDT 2025
|