bindiego
9/19/2014 - 8:05 AM

Get a list of all foreign key constraints pointing to a particular table, a particular column.

Get a list of all foreign key constraints pointing to a particular table, a particular column.

select
  TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
from INFORMATION_SCHEMA.KEY_COLUMN_USAGE
where
  REFERENCED_TABLE_NAME = '<table>';