distinct关键字,可以数据去重。
mysql> select distinct id from products;
+——+
| id |
+——+
| 1 |
| 2 |
| 3 |
+——+
3 rows in set (0.01 sec)
distinct关键字,可以数据去重。
mysql> select distinct id from products;
+——+
| id |
+——+
| 1 |
| 2 |
| 3 |
+——+
3 rows in set (0.01 sec)