I'm trying to create a unique column in SQL Azure Federation, but even though the following query creates a table, I'm still able to save entries to the table with the same Column1 value. What's the correct way to set up a unique column? I need to make sure ID is the federated uniqueidentifier column whereas, for the purposes of this demo, Column1 cannot have duplicate values.
CREATE TABLE dbo.Table1(
ID uniqueidentifier NOT NULL,
Column1 nvarchar(50) NOT NULL,
Column2 nvarchar(15) NULL,
CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED
(
ID ASC
),
CONSTRAINT [PK_Table2] UNIQUE NONCLUSTERED
(
ID ASC,
Column1 ASC
)
) FEDERATED ON ([dist] = ID)
GO