Wednesday 14 December 2005

Update a table from another table

How to update a table from another table via a 'join update' using column aliases

update
(select a.f falias1, b.f falias2 from a, b where a.id=b.id and a.falias1!=b.falias2 )
set falias1=falias2;