Oracle uses user_constraints to obtain the foreign key. All data must be processed manually in Oracle at a time. When deleting a primary table
Oracle uses user_constraints to obtain the foreign key. All data must be processed manually in Oracle at a time. When deleting a primary table
Oracle uses user_constraints to obtain the foreign key.
For example, to obtain all foreign keys:
Select CONSTRAINT_NAME constraint name, TABLE_NAME table
From user_constraints t where
1 = 1
-- T. table_name in ('tbl _ step ')
And CONSTRAINT_TYPE = 'R'
AND CONSTRAINT_NAME = 'fk _ STEP_ID ';
All data must be processed manually in Oracle at a time. When deleting a primary table, you must first Delete the secondary table record that references the primary table record. When deleting the primary table record, an FK restriction reference error is often reported.
There will be a foreign key name above. With the following statement, we can find the corresponding slave table and then process it.
Select CONSTRAINT_NAME constraint name, TABLE_NAME table
From user_constraints t where
1 = 1
T. table_name in ('tbl _ step ')
And CONSTRAINT_TYPE = 'R'
AND CONSTRAINT_NAME = 'fk _ STEP_ID ';
,