The correct usage is to place the DISTINCT keyword before the first field. So, option C is incorrect..
正确答案是:C: SELECT StudentID, DISTINCT Class FROM student;
专业分析:
1. **A: SELECT DISTINCT StudentID FROM student;**
- 这条语句是正确的。它会从 `student` 表中选择所有不同的 `StudentID`。
2. **B: SELECT DISTINCT StudentID, Class FROM student;**
- 这条语句也是正确的。它会从 `student` 表中选择所有不同的 `StudentID` 和 `Class` 组合。
3. **C: SELECT StudentID, DISTINCT Class FROM student;**
- 这条语句是错误的。`DISTINCT` 关键字不能在列名之前单独使用。`DISTINCT` 应该放在 `SELECT` 关键字之后,用来去重整个结果集。
4. **D: SELECT COUNT(DISTINCT StudentID) FROM student;**
- 这条语句是正确的。它会计算 `student` 表中不同 `StudentID` 的数量。
因此,选项 C 是不正确的。