字段去重
在数据表中,可能会有重复的数据,我们可以通过distinct
去掉重复的行。
SELECT DISTINCT name from users;
作用于多列
SELECT DISTINCT name,age from users;
#yyds干货盘点# 09 MySQL字段去重
阅读 54
2022-03-11
在数据表中,可能会有重复的数据,我们可以通过distinct
去掉重复的行。
SELECT DISTINCT name from users;
SELECT DISTINCT name,age from users;
相关推荐
精彩评论(0)