The following two system tables are used to query the table where a constraint is located.
User_constraints constraints table, which records all constraints of the user. Such as non-null and index.
User_cons_columns constraint field table, which records all fields involved in each constraint.
For example, if I want to delete a record in the TBL_USER table now, an error is reported: ORA-02292 integrity constraint (ESAWEB. FK_TBL_USER_REFERENCE_TBL_USER) violated-child record found. an error indicates that a column in the TBL_USER table has a foreign key constraint. In this case, you need to find and delete records in the table with this foreign key constraint.
Select * from user_constraints t where t. CONSTRAINT_NAME = 'fk_tbl_user_reference_tbl_user ';
Find the value in the TABLE_NAME field. The value here is the table with the FK_TBL_USER_REFERENCE_TBL_USER constraint. Find the corresponding record in the table and delete it.