[转]Oracle删除当前用户下的所有表、视图、序列、函数、存储过程、包

--delete tables
Sql代码:select 'drop table ' || table_name ||';'||chr(13)||chr(10) from user_tables;   

--delete views
Sql代码:select 'drop view ' || view_name||';'||chr(13)||chr(10) from user_views;   

--delete seqs
Sql代码:select 'drop sequence ' || sequence_name||';'||chr(13)||chr(10) from user_sequences;  

--delete s
Sql代码:select 'drop ' || object_name||';'||chr(13)||chr(10) from user_objects where object_type='';   

--delete procedure
Sql代码: select 'drop procedure ' || object_name||';'||chr(13)||chr(10) from user_objects where object_type='PROCEDURE';   

--delete package
Sql代码:select 'drop package ' || object_name||';'||chr(13)||chr(10) from user_objects where object_type='PACKAGE'; 

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