VINCOLO UNICO o indice UNICO. Entrambi andranno bene.
ALTER TABLE dbo.MyTable WITH CHECK ADD
CONSTRAINT UQ_MyTable_BookTitle UNIQUE (BookID, Title)
o
CREATE UNIQUE INDEX IXU_MyTable_BookTitle ON dbo.MyTable (BookID, Title)
VINCOLO UNICO o indice UNICO. Entrambi andranno bene.
ALTER TABLE dbo.MyTable WITH CHECK ADD
CONSTRAINT UQ_MyTable_BookTitle UNIQUE (BookID, Title)
o
CREATE UNIQUE INDEX IXU_MyTable_BookTitle ON dbo.MyTable (BookID, Title)