sql基础--怎样去除重复的行(去重)

来源:互联网 发布:淘宝信用等级查询 编辑:程序博客网 时间:2024/04/28 01:25



distinct关键字,可以数据去重。



mysql> select distinct id from products;
+------+
| id   |
+------+
|    1 |
|    2 |
|    3 |
+------+
3 rows in set (0.01 sec)

0 0