I am trying to insert records into a sqlite table where in I have to first run a select query on the table and if the record does not exists then insert it.
Is there an ef开发者_Python百科ficient way of doing this?
Looks like INSERT OR REPLACE
would suit you here aka REPLACE
in MySQL.
See:
http://www.sqlite.org/lang_replace.html
http://dev.mysql.com/doc/refman/5.0/en/replace.html
精彩评论