Sunday, April 29, 2018
Drop Table and Other Objects in Schema
-- DROP TABLE
> SELECT 'DROP TABLE "' || TABLE_NAME || '" CASCADE CONSTRAINTS;' FROM user_tables;
-- DROP OTHER OBJECTS
> select 'drop '||object_type||' '|| object_name || ';' from user_objects where object_type in ('VIEW','PACKAGE','SEQUENCE', 'PROCEDURE', 'FUNCTION', 'INDEX');
Labels:
Oracle
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment