Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to UPDATE from a linked table
October 6, 2005, 6:23 pm
rate this thread
Re: How to UPDATE from a linked table
If you use MySQL 4.0.4 or later, you can use their multi-table UPDATE
syntax. For example:
UPDATE `COMPANY`, `AREA`
SET `COMPANY`.Region_ID = `AREA`.Region_ID
WHERE `COMPANY`.Area_ID = `AREA`.Area_ID
This is MySQL-specific, so it may not work in other RDBMS brands, but it
does in MySQL.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum