I have a table call test and have four fields. i have create composit unique key on the table for which i want my records to be unique. we are tracking the previous versions of records and marking all the old records isdeleted=1, But the Problem is, my unique Key will not allow me same records with two or more isdeleted=1
Create table test (ApplicationID int,IsDeleted bit
CONSTRAINT test_uck UNIQUE (ApplicationID,IsDeleted)
)
go
insert into test values(1,0)
insert into test values(1,1)
insert into test values(1,1)