
Data Base
naturism
Run away!
展开
-
SQL经典练习题
From:http://jinl007.spaces.live.com/blog/cns!ea97e38ff8737716!174.entry 列出各系的学生数(人数多的排在前面) 1) Sql语句:select sdept,count(*) as dept_student_number from student group by sdept order by dept_stud原创 2008-11-08 20:26:00 · 928 阅读 · 0 评论 -
SQL中Count()用法
count 是一个系统内置的分组统计函数. select count(*) from XXX 返回一条记录,求XXX 里的记录总数 select count(id) from XXX group by name 返回一条或者多条记录, 根据name字段去分组统计表XXX的数据. 就是计算同样一个name(group by 后面的) 的数据有多少条原创 2008-11-08 15:45:00 · 1547 阅读 · 0 评论