I have a Microsoft SQL Server 2012 database with a huge amount of tables (>100). I have also many many-to-many relation tables. All PK/FK relationships are made in the tables so that i know in which table which column belongs to which parent or child tables columns. I wanted to ask if it is possible to have a generic script which check for a all of those or even given tables if there are orphaned items and show them me. I mean if there is any reference to a parent or child item which does not exist longer (there where errors in the Cascade Delete configuration of some tables and we need to check now the data qualit :( ).
Update
I think i couldnt explain my requirement corretly. I dont want to see the references, i want to see if any data is referencing an child item or a child item is referencing a parent item which does not exist anymore.