What are the informations are available in KEY_COLUMN_USAGE Table?
CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
ORDINAL_POSITION
POSITION_IN_UNIQUE_CONSTRAINT
REFERENCED_TABLE_SCHEMA
REFERENCED_TABLE_NAME
REFERENCED_COLUMN_NAME
Above columns are exist in INFORMATION_SCHEMA.KEY_COLUMN_USAGE
Here It is helps to see what are the fields are linked as foreign key from master tables.
REFERENCED_TABLE_NAME is the master table. It has primary key column.
TABLE_NAME, which contains foreign keys columns.
|