How to list out all Foreign Keys with “WITH NOCHECK” in SQL Server
Does anyone know a query for listing out all foreign keys in a database with "WITH NOCHECK" description applied to it? (removing them will boost performance and stability). The following will return the name of the foreign keys in the current database that are disabled i.e. WITH NOCHECK For SQL Server 2005/2008: select * from sys.foreign_keys where is_disabled=1 There was some discussion in the answer about the difference between disabled & not trusted. What's below explains the differnce Here's some code to clarify the difference between is_disabled & isnotrusted. -- drop table t1 -- drop