[plug] SQL help

Steve Baker steve at iinet.net.au
Tue Dec 13 14:36:33 WST 2005


Benjamin Woods wrote:

>I have just spoken to some people on irc and they say that mysql 3.23 cannot 
>do multitable updates. they recommended upgrading the mysql server to 4.0.X 
>after testing and backing up server.
>
>I am wondering, is there a way to do this without multitable requests?
>  
>
Yes there is, but it involves sub-selects and with my very limited mysql 
exposure I don't know how well mysql 3.23 handles those either.   You do 
something like:

update table_a
set column_xx = (select column_yy from table_b where table_b.column_bb = 
table_a.column_aa)
where column_xx is null

I don't remember enough about your original question to know whether 
this achieves exactly what you want to do, but it hopefully demonstrates 
the general structure of what you need to do.

sb




More information about the plug mailing list