机械鲨鱼:这句SQL有可以吗?

来源:百度文库 编辑:高校问答 时间:2024/04/30 12:45:22
更新当前结点中,子结点数量的值:
update nexus set childcount=(select count(id) from nexus where fid=2) where id=2;

nexus表中有
childcount字段: 其下子结点数量。
fid: 父结点id

是否此类问题只能用储存过程?
现在我只有access环境,不能通过,但access对标准SQL支持的不完整,

我想知道在标准中,是否认为这句话有问题

update nexus set childcount=(select count(id) from nexus where fid=2) where id=2;
在SQL上运行通过,ACCESS就不行,一定不行

自己运行一下看看就行