日期:2014-05-16  浏览次数:20439 次

删除数据库中全部表、视图、序列、函数、存储过程、包的脚本
select 'drop table ' || table_name ||';'||chr(13)||chr(10) from user_tables  --delete tables
union
select 'drop view ' || view_name||';'||chr(13)||chr(10) from user_views  --delete views
union
select 'drop sequence ' || sequence_name||';'||chr(13)||chr(10) from user_sequences--delete seqs
union
select 'drop function ' || object_name||';'||chr(13)||chr(10) from user_objects  where object_type='FUNCTION'--delete functions
union
select 'drop procedure ' || object_name||';'||chr(13)||chr(10) from user_objects  where object_type='PROCEDURE'--DELETE PROCEDURE
union
select 'drop package ' || object_name||';'||chr(13)||chr(10) from user_objects  where object_type='PACKAGE';--delete pags 

?