asp sql数据求和的问题

我有数据表t1t1有字段id,z1,x2,c3,d4我想按id查询一个记录后,计算对应id那一行 z1,x2,c3,d4 的和。
2026年09月28日 19:37
有2个网友回答
网友(1):

select z1+x2+c3+d4,id from t1 where id=?
select id,sum(z1),sum(x2),sum(c3),sum(d4)from t1 group by id
不知道楼主说的是那种求和,都写上了

网友(2):

select s=z1+x2+c3+d4 from t1 where id=