Add new comment

st's picture

Unique constraints supported

Unique constraints are supported, too. This code works in SQL Server 2016 version.

CREATE TABLE #temp_table (
   id1 int NOT NULL,
   id2 int NOT NULL,
   name1 nvarchar(100),
   name2 nvarchar(100),
   PRIMARY KEY (id1, id2),
   UNIQUE (name1, name2)
);