0
我有一個查詢:錯誤查詢更新的MySQL
update customers_training_malaysia
set
period_id = (select b.id
from customers_training_malaysia a,training_schedules_malaysia b
where a.sch_code=b.sch_code order by a,id)
where
sch_code = (select b.sch_code
from customers_training_malaysia a,training_schedules_malaysia b
where a.sch_code = b.sch_code order by a.id)
我嘗試下面的查詢更新運行,但我只得到了錯誤不是由作爲表達
一個子查詢返回一行更多
我該怎麼做才能糾正sql查詢?
你得到了什麼錯誤? – SergeS 2011-02-17 08:07:56
也許嘗試給你的子查詢添加一個限制1? – 2011-02-17 08:12:09