how to find foreign key in sql code example Example: how to check foreign key constraint in sql sp_help 'TableName'