SQL Server select count(distinct *)

测试表:student

select * from studnet;

image

select count(distinct name) from student;
image
select count(distinct *) from student;

image

这样是有错误的,可以变通的实现
select count(*) 
from
(select distinct * from student) st;

image

此路不通,我走另一条路!

posted @ 2014-12-11 16:43  cnmarkao  阅读(642)  评论(0编辑  收藏  举报