Created
September 29, 2024 06:18
-
-
Save tomfa/1f949102c93e61db4d4f8c8826f9f40b to your computer and use it in GitHub Desktop.
MSSQL find all referencing FKs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
referencing_schema_name, referencing_entity_name, referencing_id, | |
referencing_class_desc, is_caller_dependent | |
FROM | |
sys.dm_sql_referencing_entities ('REPLACE_WITH_TABLE_NAME', 'OBJECT'); | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment