您的位置:首页 > 博客中心 > 数据库 >

SQL Server select count(distinct *)

时间:2022-03-14 03:43

测试表:student

select * from studnet;

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

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

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

热门排行

今日推荐

热门手游