如何创建网格列增加价值 [英] how to create a grid column add value
本文介绍了如何创建网格列增加价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
sno Particular Dr
1 a 2
2 a1 3
3 a2 4
4 a total 9 (2+3+4)
5 b 3
6 b1 1
7 b2 1
8 b3 1
9 b4 1
10 b total 16 (9+3+1+1+1+1)
推荐答案
在SQL Server中,您可以像这样进行选择
从myTable中选择a,b,a + b作为c.
这将返回三列,其中c是基于现有值(添加的a和b)的发明列.您还可以执行诸如MAX(获得最高值),MIN(获得最低值)和SUM(获得总计)之类的事情.
我认为这可以回答您的问题,如果没有解决,那么请改善您的问题,这样实际上是一个明确的问题.
In SQL Server you can do a select like this
select a, b, a+b as c from myTable.
This will return three columns, with c being an invented column based on the existing values ( a and b added ). You can also do things like MAX ( to get the highest value ), MIN ( to get the lowest ) and SUM ( to get a total ).
I think that answers you, if it doesn''t, then improve your question so it actually is a clear question.
这篇关于如何创建网格列增加价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文