Link to home
Start Free TrialLog in
Avatar of Easwaran Paramasivam
Easwaran ParamasivamFlag for India

asked on

To get all referrenced columns - Need TSQL script

If I pass table name and column name it should return all the Table names and columns where the given column is referred as FK.  How to achieve this? Please do assist.

Ex: GetAllReference('Employee','EmpID')

Should retun as given below

TABLE            COLUMN
-----------------------------------------
Dependent    DependentEmpID
PolicyAsist     EmpID.
SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Easwaran Paramasivam

ASKER

Thanks.