`

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

阅读更多
--delete tables
select 'drop table ' || table_name ||';'||chr(13)||chr(10) from user_tables; 


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


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


--delete functions
select 'drop function ' || object_name||';'||chr(13)||chr(10) from user_objects where object_type='FUNCTION'; 


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


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


分享到:
评论
1 楼 dingherry 2012-07-09  
你这只是找出了当前用户下有哪些对象,删除操作呢?

相关推荐

Global site tag (gtag.js) - Google Analytics