一个SQL语句
阿三 2009-03-11 04:24:56
1.
update cont_table set total_CP=(select sum(CP_amm) from CP_table
where cont_table.cont_no=CP_table.cont_no)
2.
update cont_table set total_CP=(
select cp_amm from
(select cont_no,sum(CP_amm) cp_amm from CP_table group by cont_no) B
where cont_table.cont_no=B.cont_no)
这两种写法有什么区别吗,有点晕了:(