Aditya
Aditya

Reputation: 195

How to find dependency of a column

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

Answers (2)

Dba
Dba

Reputation: 6639

Use the below query.

SELECT * 
FROM user_constraints 
WHERE r_constraint_name= '<constraint_name>';

Upvotes: 2

Incognito
Incognito

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

Related Questions