求个sql
A表ID1,NUM
B表ID1,ID2
C表ID2,。。。
A.ID1=B.ID1 B.ID2=C.ID2
现在要更新A表的NUM 值等于B表的ID2的数量
更新单个的话
update A set NUM=(selete count(*) from B,C where B.ID2=C.ID2 and B.ID1=11111)
where A.ID1=11111
更新全部?
update A set NUM=?
from 。。。
where。。。
现在用的sybase版本 from里不给子查询 where后面接group by提示语法错误