[thelist] [mysql] multiple update query

Tab Alleman Tab.Alleman at MetroGuide.com
Wed Mar 10 09:38:02 CST 2004


kris burford wrote:
>>> is there a means i can do something like
>>> update table set (foo='1' where id ='1'), (foo='2' where id='2');

> can't believe that there's not a simpler method...

Well I don't know about MySQL, but SQL2k supports this:

UPDATE Table
SET foo=id

Is that what you want?


More information about the thelist mailing list