Skip to content

Instantly share code, notes, and snippets.

@tkMageztik
Created February 19, 2014 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkMageztik/9094694 to your computer and use it in GitHub Desktop.
Save tkMageztik/9094694 to your computer and use it in GitHub Desktop.
Genera sentencias para eliminación de constraints
SELECT
'ALTER TABLE ' + OBJECT_SCHEMA_NAME(parent_object_id) +
'.[' + OBJECT_NAME(parent_object_id) +
'] DROP CONSTRAINT ' + name
FROM sys.foreign_keys
WHERE referenced_object_id = object_id('Mantenimiento.SIC_T_ALMACEN')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment