On Fri, Apr 1, 2011 at 21:36, Igor Tandetnik wrote:
> update table_a set avalue = (
> select bvalue from table_b where akey=bkey
> union all
> select avalue);
That also works. But at the risk of "moving the finish line during
the race", I should point out that the
Robert Poor wrote:
> On Fri, Apr 1, 2011 at 20:13, Igor Tandetnik 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.
>
2 matches
Mail list logo