update a set cprs = (select count(*) from b where a.pxbid = b.pxbid)
update a set cprs = (select count(rowid) from b where b.pxbid = a.pxbid group by b.pxbid)
有两个表,a 表:pxbid培训班编号(关键字) cprs参培人数 b表:pxbid培训班编号(关键字)kaohao(关键字) 现要将统计b表中每个培训班的考生数并更新到a 表相应的cprs字段。 update a set cprs = (select count(kaono) from b where a.pxbid = b.pxbid) where a.pxbid = b.pxbid
b表:pxbid培训班编号(关键字)kaohao(关键字)
现要将统计b表中每个培训班的考生数并更新到a 表相应的cprs字段。
update a set cprs = (select count(kaono) from b where a.pxbid = b.pxbid)
where a.pxbid = b.pxbid