求一sql语句
表结构如下:
表名student
id(自动增长类型) name(字符串类型)
1 张三
2 王二
3 李四
4 张三我想通过一个sql语句查询出来学生的数量,名字相同的为一个学生,即应当查询出来学生的
数量为3个,我通过下面的sql语句语法错误,请大家指正一下
select count(distinct name) from student
我想通过这个语句等到结果是:3,但语法错误
表结构如下:
表名student
id(自动增长类型) name(字符串类型)
1 张三
2 王二
3 李四
4 张三我想通过一个sql语句查询出来学生的数量,名字相同的为一个学生,即应当查询出来学生的
数量为3个,我通过下面的sql语句语法错误,请大家指正一下
select count(distinct name) from student
我想通过这个语句等到结果是:3,但语法错误
解决方案 »
- 寻找
- 求php连接sql2000读取数据源码
- 跪求php model类
- 哪位有PHP的淘宝支付插件,共享一下吧。邮箱[email protected],谢谢非常
- 求推荐一个PHP开源的企业网站系统
- ECShop网站的复制与移植 跪求帮助
- 采集网站内容,停止在多少行!如何操作!
- 在codeiginter中加载My97 DatePicker后除了火狐其他浏览器都没效果
- 关于IIS6启用GZIP,检测Connection为close,希望改为Keep-Alive
- APACHE使用.htaccess伪静态请问怎么写?
- Job opportunity from Thouthtworks.
- 急求 php smarty 本机访问正常,其它客户端无法访问(显示一直在加载)
select count( distinct name) from student
--统计每个名字的数量
select name, count(*) from student
group by name