删除所有Table和Sequence的SQL语句

For Table:

SELECT 'DROP TABLE ' || TABLE_NAME || ' CASCADE CONSTRAINTS;' FROM user_tables;

For Sequence:

SELECT 'DROP SEQUENCE ' || sequence_name || ';' FROM user_sequences;

运行以上命令将会生成一系列DROP TABLE/SEQUENCE 语句, 然后ctrl+A, ctrl+C, ctrl+V, 运行, 不需要手动一个个删除.
 

 

你可能感兴趣的:(sql,DB)