Trace the links to a column in SQL (primary key)

I wish to trace a link for a column (primary key) to see what other tables will be referencing it.

The reason for this is:
I have a problem with the way I entered the data into my sql DB.
I simply copy and pasted the data, which works fine until I insert a new data row through the software front end (Access Dimension) which crashes with a primary key dublication issue.
The old PK where pasted in and now when I get to an insert PK of 2 (the 2nd) it fails.

Alternatively a way to reset the PK value would suffice but the most common ways do not work as the field is a float.

any advise is very appriciated
Who is Participating?
mimran18Connect With a Mentor Commented:
Goto SSMS.
Select the table and right click on it
and select the view dependencies.
dexterhomeAuthor Commented:
Thanks for that mimran18.

This appears to show me the dependencies for the stock table which is a lot.
Can it be narrowed down to the column in any way?
Simone BConnect With a Mentor Senior E-Commerce AnalystCommented:
If the name of the key is consistent, eg the primary key for employee always appears as EmployeeID, then you should be able to find all related tables using the Information_Schema views.


Use MyDatabase

where COLUMN_NAME = 'EmployeeID'
dexterhomeAuthor Commented:
thanks guys
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.