I have a table, something like
FieldsOnForms(
FieldID int (FK_Fields)
FormID int (FK_Forms)
isDeleted bit
)
The pair (FieldID, FormID) must be unique, but only if the row is not deleted (isDeleted = 0).
Can this limitation be defined in SQLServer 2008? (without using triggers)
PS The Setting parameter (FieldID, FormID, isDeleted) is unique, it adds the ability to mark one line as deleted, but I would like to be able to set n lines (for each FieldID, FormID) to isDeleted = 1 and only have one with isDeleted = 0
source
share