关于SQL Server数据库表中特定列的计算 [英] Regarding Calculation in a particular column in a table of SQL Server database

查看:81
本文介绍了关于SQL Server数据库表中特定列的计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

我使用C#和SQL Server 2005开发了一个Windows窗体应用程序。我在数据库中使用了很多表。有一个表Sales_Details,其中存在Price列。现在我想通过计算加载表单来显示总价格。

Dear All
I developed a windows form application by using C# and SQL Server 2005. I used many tables in my database. There is a table namely "Sales_Details" in which a column ''Price'' is existed. Now I want to show total price by calculating in loading the form.

推荐答案

select sum(price) from sales_details
where ** whatever your criteria are **





将为您提供总额



will give you the total


这篇关于关于SQL Server数据库表中特定列的计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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