I'm assuming that you're running < 4.1, otherwise you would have tried that code and found it to work...
You may have to get the result of (select id from countries where has_zones=0) first, store it in a variable, then
update tbl_a set location_code=0 where tbl_a.country_id = your_variable
Diana Castillo wrote:
how do I make a query that does this?
update tbl_a set location_code=0 where tbl_a.country_id = (select id from countries where has_zones=0)
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]