journal capturing best practises, patterns and solutions to problems encountered in the design and development of enterprise software.
Thursday, 18 August 2011
Drop all tables from schema
Run below code to drop all the tables from schema.
BEGIN FOR i IN (SELECT table_name FROM user_tables)
LOOP EXECUTEIMMEDIATE('DROP TABLE ' || user || '.' || i.table_name || ' CASCADE CONSTRAINTS');
ENDLOOP;
END;
No comments:
Post a Comment