All pastes #422699 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-03 17:12 UTC
rendered paste body
mysql> describe test1;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id    | int(11)     | YES  |     | NULL    |       |
| data  | varchar(40) | YES  |     | NULL    |       |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.00 sec)


mysql> select * from test1;
+------+-------+
| id   | data  |
+------+-------+
|    1 | yes   |
|    1 | no    |
|    1 | myabe |
|    2 | yes   |
|    1 | yes   |
+------+-------+
5 rows in set (0.00 sec)

mysql> select distinct * from test1;
+------+-------+
| id   | data  |
+------+-------+
|    1 | yes   |
|    1 | no    |
|    1 | myabe |
|    2 | yes   |
+------+-------+
4 rows in set (0.00 sec)