Question : dependent constraints

how can you script which constraints have dependent constraints under them (hence, the ones you cannot remove)

thanks

Answer : dependent constraints

Lists all primary keys
Use DatabaseName
SELECT name,type,type_desc
  FROM [ESReporting].[sys].[key_constraints]
  where type = 'PK'

Lists all Foreign keys
Use DatabaseName
SELECT name,type,type_desc FROM sys.foreign_keys
Random Solutions  
 
programming4us programming4us