欢迎光临
 
日历
<<  < 2009 - >  >>
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
最新日志
最新评论
最新留言
 
求和函数,求数据表中某列的和函数,asp教程

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>统计</title>
</head>

<!--本文所有信息都是由http://www.isee5.com Isee5音乐网提供-->
<body>
<%
Dim objConn,objRS
Set objRS = objConn.Execute("SELECT Sum(number) FROM table1") 'number是要统计的字段名, table1是表名, sum()是求和
Response.Write objRS(0) '输出统计后的数字
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</body>
</html>

isee5 发表于 2007/9/26 12:03:00 | 阅读全文 | 回复(0) | 引用通告 | 编辑
 
发表评论:
 
     
Powered by Oblog.