2015年8月28日 星期五

Oracle SQL PLSQL Truncate and Drop All Tables with TableSpace




BEGIN 
    FOR t IN (SELECT table_name 
              FROM   user_tables 
              WHERE  tablespace_name IS NOT NULL) LOOP 
        EXECUTE IMMEDIATE ' truncate table '|| t.table_name; 

        EXECUTE IMMEDIATE ' drop table '|| t.table_name; 
    END LOOP; 
END; 

/ 

沒有留言:

張貼留言

2007 to 2023 HP and Dell Servers Comparison

  HP Gen5 to Gen11  using ChatGPT HP ProLiant Gen Active Years CPU Socket Popular HP CPUs Cores Base Clock Max RAM Capacity Comparable Dell ...