You are here: Home > Technical Articles > MS SQL Server - Create Unique Nonclustered Index on a Table

MS Sql Server - Script for creating unique nonclustered index on a table




IF (SELECT COUNT(*) FROM sysindexes WHERE name = 'UNQ_settings') = 0
BEGIN
    CREATE UNIQUE NONCLUSTERED INDEX "UNQ_settings" ON "system_settings"
    (
        "ss_name" ASC
    )
END
GO


Published On: 02 Aug 2009