摘要: 分页效果图:Griview 数据绑定: private void hh()//gridview绑定数据 { using (SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=StaffMs;Integrated Security=True")) { SqlCommand com = new SqlCommand("select * from(select row_number()over(order by sf_number)as number ,*from dbo.staff) 阅读全文
posted @ 2011-12-29 20:23 偶不是大叔 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 1. count() 查询学生总人数。select count(*) from scount(*)表示对元组或记录计数。2.sum()返回组中所有值的和。sum只能用于数字列,空值会被忽略!3.avg()返回组中值的平均值,空值回避忽略!4.max()返回组中值的最大值5.min()返回组中值的最小值6.计算c1课程的学生人数、最高成绩、最低成绩及平均成绩select count(*),max(score),min(score),avg(score) from sc where cno='c1'数据库表s,c,sc截图请到:http://www.cnblogs.com/fuge 阅读全文
posted @ 2011-12-29 17:13 偶不是大叔 阅读(3123) 评论(0) 推荐(0) 编辑