Reputation: 195
In oracle how can we find all the foreign key of a column.
Meaning to say in table info i have id column.
So how can I find who is referring id column.
Upvotes: 1
Views: 584
Reputation: 6639
Use the below query.
SELECT *
FROM user_constraints
WHERE r_constraint_name= '<constraint_name>';
Upvotes: 2
Reputation: 3094
Find the constraint name for your column, and then use the query below
SELECT table_name
FROM all_constraints
WHERE r_constraint_name = ConstraintName;
Upvotes: 0