禁用外键
-
Oracle批量执行sql语句之禁用所有表的外键
要禁用Oracle中所有表的外键,可以使用以下SQL语句:,,``sql,BEGIN, FOR t IN (SELECT table_name FROM user_constraints WHERE constraint_type = 'R') LOOP, EXECUTE IMMEDIATE 'ALTER TABLE ' || t.table_name || ' DISABLE CONSTRAINT ' || t.constraint_name;, END LOOP;,END;,/,``