字段去重
在数据表中,可能会有重复的数据,我们可以通过distinct
去掉重复的行。
SELECT DISTINCT name from users;
作用于多列
SELECT DISTINCT name,age from users;
微信扫一扫
在数据表中,可能会有重复的数据,我们可以通过distinct
去掉重复的行。
SELECT DISTINCT name from users;
SELECT DISTINCT name,age from users;
相关推荐