作者:薇薇llfnc | 来源:互联网 | 2023-10-15 15:23
方法一:Distinct
SELECT DISTINCT ColName FROM TableName
方法二:Group By
SELECT ColName FROM TableName GROUP BY ColName
更多内容:
查询并统计该字段的数量
SELECT ColName,COUNT(COlName) FROM TableName GROUP BY ColName