3.12.10

A quick one for Oracle..

When you need to find the foreign keys referencing an object in Oracle

select owner, constraint_name, constraint_type, table_name, r_constraint_name, status
from user_constraints
where constraint_type = 'R' and r_constraint_name in (
select constraint_name
from user_constraints
where constraint_type in ('P','U')
and table_name = 'TABLE_NAME'
);

No comments: