On 8-12-2014 21:17, Igor Tandetnik wrote:
On 12/8/2014 3:08 PM, Luuk wrote:
i hope this does it:

update temp_table
set id=(select id from some_table where c=42),
operation='UPDATE'
where exists (select 1
     from some_table s, temp_table t
     where s.a=t.a and s.b=t.b);

This updates all rows in temp_table, as long as at least one row in
temp_table matches one row in some_table. In other words, it updates no
rows, or all rows - never just some.

you are right....

update temp_table
set id=(select id from some_table where c=42),
operation='UPDATE'
where exists (select 1
    from some_table s, temp_table t
    where s.a=t.a and s.b=t.b and s.c=42);
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to