Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tsql:find_foreign_keys_referencing_a_table [2014/11/27 22:38]
127.0.0.1 external edit
tsql:find_foreign_keys_referencing_a_table [2017/07/21 21:47] (current)
Line 1: Line 1:
 ====== Find foreign keys referencing a table ====== ====== Find foreign keys referencing a table ======
  
-Finding which table is referenced by a foreign key is easy -- just look at the FK definition. Given a table //T//, this query will do the opposite -- finding any FKs defined on (probably other) ​tables which reference //T//.+Finding which table is referenced by a foreign key is easy -- just look at the FK definition. Given a table //T//, this query does the opposite -- it reports ​tables' FKs which reference //T//.
  
 <code tsql>​WITH cte AS ( <code tsql>​WITH cte AS (