刪除一個使用者下所有的物件

壹頁書發表於2013-11-05

  1. set echo off
  2. set feedback off
  3. set newpage none
  4. set pagesize 5000
  5. set linesize 500
  6. set verify off
  7. set pagesize 0
  8. set term off
  9. set trims on
  10. set linesize 600
  11. set heading off
  12. set timing off
  13. set verify off
  14. set numwidth 38
  15. spool drop.sql
  16. select 'drop '|| object_type||' '||object_name||decode(object_type,'TABLE',' purge;',';') from user_objects;
  17. spool off
  18. @drop.sql

關於sqlplus中set的用法,參見
http://blog.csdn.net/tianlesoftware/article/details/5040984


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29254281/viewspace-775788/,如需轉載,請註明出處,否則將追究法律責任。

相關文章