Mysql Basis Posted on 2019-05-09 Edited on 2023-10-07 In Tech Symbols count in article: 181 Reading time ≈ 1 mins. 关键字distinct123456SELECT DISTINCT(gender) FROM employees;gender --------M F 但是以下情况失效。这时适合用group by 12SELECT DISTINCT(gender), emp_no FROM employees;SELECT gender, emp_no FROM employees GROUP BY gender;