bluebunny72 icon

Filtered Unique Index

bluebunny72 | PRO | 05/27/15 02:51:04 PM UTC | 0 ⭐ | 631 👁️ | Never ⏰ | []
T-SQL |

240 B

|

None

|

0 👍

/

0 👎

IF NOT EXISTS(SELECT TOP 1 1 FROM sys.indexes WHERE name = 'IX_ILC_iso_country_code')
  BEGIN
    CREATE UNIQUE NONCLUSTERED INDEX IX_ILC_iso_country_code
    ON dbo.country(iso_country_code)
    WHERE iso_country_code IS NOT NULL;
  END
  
GO

Comments