时间:2021-07-01 10:21:17 帮助过:4人阅读
1
SELECT ‘alter table ‘|| t.table_name||‘ disable constraint ‘||t.constraint_name||‘;‘ FROM user_constraints t WHERE t.constraint_type = ‘R‘;
2
SELECT ‘ALTER TABLE ‘|| table_name || ‘ ENABLE CONSTRAINTS ‘ || t.constraint_name ||‘;‘ FROM user_constraints t WHERE t.constraint_type = ‘R‘ ;
3
ALTER TABLE TBL_NAME DISABLE CONSTRAINTS FK_TBL_ID;
4
ALTER TABLE TBL_NAME ENABLE CONSTRAINTS FK_TBL_ID;
5
ALTER TABLE TBL_NAME ENABLE ALL TRIGGERS;
6
ALTER TABLE TBL_NAME DISABLE ALL TRIGGERS;
7
INSERT INTO tbl_import SELECT * FROM tbl_export;
8
GRANT SELECT ON tbl_export TO schema_out;
几个有用的oracle语句
标签: