Possible Duplicate:
Mysql DISTINCT not working if I add another column
mysql> select DISTINCT number, id from table order by rand()
+------+------------+
| id | number |
+------+------------+
| 2 | 4 |
| 1 | 3 |
| 4 | 3 |
| 3 | 4 |
+------+------------+
I need to get something like that
+------+------------+
| id | number |
+------+------------+
| 2 | 4 |
| 4 | 3 |
+------+------------+
Refresh
+------+------------+
| id | number |
+------+------------+
| 3 | 4 |
| 1 | 3 |
+------+------------+
Refresh….
1 Answer