Oracle Drop多表
Oracle Drop多表
Drop 以_HD结尾的多张表,在TestWindow中执行。谨慎使用
DECLARE I INTEGER; BEGIN FOR TODROP IN (SELECT TABLE_NAME FROM USER_TABLES WHERE TABLE_NAME LIKE '%_HD') LOOP EXECUTE IMMEDIATE 'drop table ' || TODROP.TABLE_NAME || ''; END LOOP; END;