UNIEKE BEPERKING of UNIEKE index. Een van beide is voldoende.
ALTER TABLE dbo.MyTable WITH CHECK ADD
CONSTRAINT UQ_MyTable_BookTitle UNIQUE (BookID, Title)
of
CREATE UNIQUE INDEX IXU_MyTable_BookTitle ON dbo.MyTable (BookID, Title)
UNIEKE BEPERKING of UNIEKE index. Een van beide is voldoende.
ALTER TABLE dbo.MyTable WITH CHECK ADD
CONSTRAINT UQ_MyTable_BookTitle UNIQUE (BookID, Title)
of
CREATE UNIQUE INDEX IXU_MyTable_BookTitle ON dbo.MyTable (BookID, Title)