On Feb 25, 2013, at 11:54 PM, anydacdev anydacdev <anydac...@gmail.com> wrote:

> I was wondering what is SQLite's equivalent to:
> 
> MERGE INTO x TGT

There is none. Even though it's standard SQL (SQL:2003 or such), this is not 
supported by SQLite in any way, shape, or form.

One could make do with a loop of  'insert or ignore' + 'update'. But that's 
about it. Rather limited and cumbersome. Sigh…

If there was just *one* statement I wish SQLite supported, MERGE would be it. 

N.B. 

Be wary of 'insert or replace'  as it's really the equivalent of 'delete' + 
'insert'… usually not what one wants…

http://www.sqlite.org/lang_conflict.html

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

Reply via email to