ho scritto tutti i campi in questo modo:
ALTER TABLE AnagraficaStagisti
ADD cs_row AS CHECKSUM(Nome, Cognome, DataNascita, LuogoNascita, Ruolo, Utente, Password);
GO
ALTER TABLE AnagraficaStagisti ADD CONSTRAINT
UK_cs_row UNIQUE NONCLUSTERED
(
cs_Row
) WITH
( STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON
) ON [PRIMARY]
GO
e mi dà questo errore:
Msg 1505, Level 16, State 1, Line 1
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.AnagraficaStagisti' and the index name 'UK_cs_row'. The duplicate key value is (1541097578).
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
The statement has been terminated.