如何在asp.net中的值行 [英] how to rows of values in asp.net

查看:55
本文介绍了如何在asp.net中的值行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友我有一些行..学生费用栏



i想通过使用学生ID来计算支付给学校多少费用所以请写一个查询添加行值的结果..



像学生id = 1,他付了3次,1000,500,3000..iwat显示总金额= 4500 in asp.net所以请帮忙..

谢谢你,..

hi friends ia have some rows ..student fee column

i wan to calculate by using student id how much fee was payed to school so please write a query for result for addition of rows values..

like student id =1 , his payed 3 time ,1000,500,3000..iwat to display total amount =4500 in asp.net so please help ..
thank you ,..

推荐答案

你可以使用SUM函数,返回一个总和数字列。请参阅下面的查询摘要

You can use SUM function, returns the total sum of a numeric column. see below query snippet
SELECT SUM(fee) AS FeesPaid FROM table1 where student id =1 



希望有帮助


Hope it helps


这篇关于如何在asp.net中的值行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆