non-identifying relationships | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

non-identifying relationships

Hi guys, does anyone know what would be the best approach to find out all the non-identifying relationships within a given db? I already made code that iterates systables and passes the tablename to a query on sysforeignkeys where rkeyid= @tablename. Is fkeyid the actual name of the foreign key table to the parent (rkeyid)? Just seeing if there is a better way to accomplish this. thx
BOL quotes
quote:Object ID of the table with the FOREIGN KEY constraint.
Object ID of the table referenced in the FOREIGN KEY constraint.
This table is referenced for backward compatability and take help of DMVs sys.foreign_keys in this case. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.