I have a table where two columns must be unique so I've specified
UNIQUE( tagid, recid ) in the Create Table.

It is perfectly valid, but infrequent, for an insert to occur where the
constraint will fail. In this scenario I'm wondering whether it is
best practice to always do a select first and not proceed with the
insert as required, or just handle the conflict as being acceptable
vs. an exception?

Seeing this is in infrequent, my feeling is that always doing a select
first is a waist of time & resources.

-- 
Best regards,
  Neville Franks, http://www.surfulater.com http://blog.surfulater.com
 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to