Update with two tables??
Update with two tables??
От:
Mark <mlundquist@bvsdps.com>
Дата:
I am trying to update table A with data from table B. I thought I could do something like: UPDATE A SET A.name = B.name WHERE A.id = B.id FROM B but alas, this does not work. Anyone have an idea of how I can do this? -Mark ----------------------------------------------------------------- Mark Lundquist mlundquist@bvsdps.com -----------------------------------------------------------------
Re: [SQL] Update with two tables??
От:
Fomichev Michael <fomichev@null.ru>
Дата:
On Wed, 16 Jun 1999, Mark wrote: > I am trying to update table A with data from table B. I thought I could do > something like: > > UPDATE A > SET A.name = B.name > WHERE A.id = B.id > FROM B > > but alas, this does not work. > > Anyone have an idea of how I can do this? It works. But you don't need A.name:UPDATE ASET name = B.nameFROM BWHERE A.id = B.id; @------------------+-----------------------------------------------@ | Fomichev Mikhail | The Government of Kamchatka region. | | Vladimirovich | The Labour and Social Development Department. | || | @------------------+-----------------------------------------------@