我有这个问题:
SELECT COUNT (DISTINCT Class)
from student ;
我得到了:
此查询中的语法错误(缺少运算符)。
答案 0 :(得分:0)
你可能在此之后:
SELECT COUNT(*) As ClassCount
FROM (SELECT DISTINCT Class FROM student);
或:
SELECT COUNT(*) As ClassCount
FROM (SELECT DISTINCT Class FROM student) AS T;