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

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

原文地址:https://www.cnblogs.com/cnmarkao/p/4157961.html