I use a database project in visual studio
I tried to get rid of that error by allowing UNIQUE NULLABLES but it keeps appearing
I want fields to have unique values EXCEPT when they are null
(I know there are many answers but they dont relate to a create table query)
what do I do wrong ?
CREATE TABLE [dbo].[users] (
[Id] INT IDENTITY (1, 1) NOT NULL PRIMARY KEY,
[Email] VARCHAR (100) UNIQUE NONCLUSTERED NULL DEFAULT NULL,
[Login] VARCHAR (100) UNIQUE NONCLUSTERED NULL DEFAULT NULL,
[Identifier] VARCHAR(40) NOT NULL UNIQUE DEFAULT newid(),
[ResetPasswordToken] VARCHAR(40) UNIQUE NONCLUSTERED NULL DEFAULT NULL,
[ResetPasswordDate]DATETIME UNIQUE NONCLUSTERED NULL DEFAULT NULL,
...(other fields)
);
thanks for your help on this