删除Oracle数据库所有表

BEGIN
    FOR t IN (SELECT table_name FROM user_tables) LOOP
        EXECUTE IMMEDIATE 'DROP TABLE "' || t.table_name || '" CASCADE CONSTRAINTS';
    END LOOP;
END;
posted @ 2024-10-15 09:31  岁月淡忘了谁  阅读(4)  评论(0编辑  收藏  举报