advanced code snippet search
kamilch on 08/06/09
Oracle
08/06/09 06:00am08/06/09 05:56am
1 person have marked this snippet as a favorite
michaelss
-- drop all tables in current schemaDECLARE table_name VARCHAR2(30); CURSOR usertables IS SELECT * FROM user_tables WHERE table_name NOT LIKE 'BIN$%';BEGIN FOR next_row IN usertables LOOP EXECUTE IMMEDIATE 'drop table ' || next_row.table_name || ' cascade constraints'; END LOOP;END;/
Report this snippet Tweet
Comment:
You need to login to post a comment.