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