MySql count去掉重复语句
1.select count(distinct SName) from Student
2.select count(SName) from (select distinct SName from Student) as temp
as可有可无。temp作为别名,若无则提示错误:1248 – Every derived table must have its own alias
MySql count去掉重复语句
1.select count(distinct SName) from Student
2.select count(SName) from (select distinct SName from Student) as temp
as可有可无。temp作为别名,若无则提示错误:1248 – Every derived table must have its own alias