0
上午使用MySQL 5.5.9在Windows 7 32位家伙是真的很糟糕的情况需要绝望的帮助 在我的程序中我有临时表temp01 和在我的数据库我有代理表和我的存储过程有IN Ico_id int作为参数 与此一起,我没有在temp01表cl列请记下它。Mysql更新表与选择使用组
update agent a
join (
select sum(ifnull(t_dr_amt,0)) - sum(ifnull(t_cr_amt,0)) as cl
from temp01
group by t_ac_id
) as tt
on a.co_id = tt.t_co_id
and a.agent_id = tt.t_ac_id
SET a.cl = tt.cl
where a.co_id = 1
AND lower(a.io) = 'y';
当我运行存储过程把它给我的错误:在“上cluase”