首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

请问条SQL语句distinct

2012-11-09 
请教条SQL语句distinctselect distinct count(name) from table_my如上,为何distinct不会过滤我查询name列

请教条SQL语句distinct
select distinct count(name) from table_my

如上,为何distinct不会过滤 我查询name列有多少条,需要过滤掉重复的。

[解决办法]
select COUNT(distinct name) from table_my
[解决办法]
DISTINCT放到括号里面

热点排行