I am using SQLite3 in one of my projects and I need to ensure that the rows that are inserted into a table are unique with regard to a combination of some of their columns. In m
Case When Exists((Select ID From Table Where Fld0 = value0 and Fld2 = value1 and Fld3 = value 2)) Then
--Insert Statement
End
I'm not 100% that the insert works like that in SQLite, but I think it should. This with proper indexing on the Where
fields should be rather quick. However this is two transactions which is something to consider.