Below is a query to display foreign key relationships in a database.

query to display foreign key relationships in sql server

The delete_referential_action_desc and update_referential_action_desc column describes the action that occurs when a delete or update occurs. The values available here are no action, cascade, set null and set default. A foreign key is active when is_disabled is 0.

Regards

Ahmad Osama

Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook