Prevent duplicate rows with many columns Here is the shortened version of my table:

   CREATE TABLE [dbo].[Ability_Main](
    [Ability_ID] [smallint] NOT NULL,
    [Ability_Text] [nvarchar](150) NOT NULL,
    [Flag_Conditional] [bit] NOT NULL,
    [Flag_Choose] [tinyint] NOT NULL
--around 20 flag columns, bit type
 CONSTRAINT [PK_Ability_Main] PRIMARY KEY CLUSTERED 
(
    [Ability_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Ability_Main]  WITH CHECK ADD  CONSTRAINT [CK_Ability_Main_Choose] CHECK  (([Flag_Choose]&gt;=(0) AND [Flag_Choose]&lt;=(2)))
GO

ALTER TABLE [dbo].[Ability_Main] CHECK CONSTRAINT [CK_Ability_Main_Choose]
GO


My question is - I want to prevent adding a duplicate entry that has the same flags - do I need to add a unique constraint on every single column (so 20+ constraints) or is there an easier way?
Here's an example where a the unique constraint is part of the table creation command...

CREATE TABLE dbo.Ability_Main (
    Ability_ID SMALLINT NOT NULL,
    Ability_Text NVARCHAR (150) NOT NULL,
    Flag_Conditional BIT NOT NULL,
    Flag_Choose TINYINT NOT NULL,
    F1 BIT NOT NULL,
    F2 BIT NOT NULL,
    F3 BIT NOT NULL,
    F19 BIT NOT NULL,
    F20 BIT NOT NULL,
    CONSTRAINT UQ_AbilityMain_BitFlags
        UNIQUE (F1, F2, F3, F19, F20)
        --WITH (...) ON [FILEGROUP],
    CONSTRAINT PK_Ability_Main
        PRIMARY KEY CLUSTERED (Ability_ID ASC)
        WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY];
GO


Or added after the fact, in a separate command...

ALTER TABLE dbo.Ability_Main ADD CONSTRAINT UQ_AbilityMain_BitFlags UNIQUE (F1, F2, F3, F19, F20)
--WITH (...) ON [FILEGROUP];
GO