Robert Poor <[email protected]> wrote:
> On Fri, Apr 1, 2011 at 20:13, Igor Tandetnik <[email protected]> wrote:
>> Or
>> update table_a set avalue=coalesce(
>> (select bvalue from table_b where akey=bkey), avalue);
>
> Nice. But if table_b.value is null, it won't get copied into table_a.
> That would be a unexpected.
update table_a set avalue = (
select bvalue from table_b where akey=bkey
union all
select avalue);
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users