Skip to content

Instantly share code, notes, and snippets.

@tkMageztik
Created September 7, 2016 21:10
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/16bb4b7000278518e44f6ec47f04be75 to your computer and use it in GitHub Desktop.
Save tkMageztik/16bb4b7000278518e44f6ec47f04be75 to your computer and use it in GitHub Desktop.
Para crear un constraint UNIQUE que permita nulos, en su lugar crear un índice NONCLUSTERED. MSSQL 2008+
CREATE UNIQUE NONCLUSTERED INDEX BFIN_BFBMM01_CLIENTES_CUENTAS_02
ON BFBMM01_CLIENTES_CUENTAS(M01_NRO_CTA_IBS)
WHERE M01_NRO_CTA_IBS IS NOT NULL
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment