/* Table Structure * * DROP TABLE IF EXISTS ' T1 '; CREATE TABLE IF not EXISTS ' T1 ' ( ' ID ' INT (1) Not NULL auto_increment, ' Name ' VARCHAR not NULL, ' Add ' VARCHAR not NULL, PRIMARY KEY (' id ') ) Engine=innodb; /* INSERT TEST data * * INSERT into ' t1 ' (' name ', ' Add ') VALUES (' abc ', ' 123 '), (' abc ', ' 123 '), (' abc ', ' 321 '), (' abc ', ' 123 '), (' Xzy ', "123"), (' Xzy ', "456"), (' Xzy ', "456"), (' Xzy ', "456"), (' Xzy ', "789"), (' Xzy ', "987"), (' Xzy ', "789"), (' Ijk ', "147"), (' Ijk ', "147"), (' Ijk ', "852"), (' Opq ', "852"), (' Opq ', "963"), (' OPQ ', "741"), (' TPK ', "741"), (' TPK ', "963"), (' TPK ', "963"), (' Wer ', "546"), (' Wer ', "546"), (' Once ', "546"); SELECT * from ' T1 '; +----+------+-----+ | ID | name | Add | +----+------+-----+ | 1 | ABC | 123 | | 2 | ABC | 123 | | 3 | ABC | 321 | | 4 | ABC | 123 | | 5 | Xzy | 123 | | 6 | Xzy | 456 | | 7 | Xzy | 456 | | 8 | Xzy | 456 | | 9 | Xzy | 789 | | 10 | Xzy | 987 | | 11 | Xzy | 789 | | 12 | Ijk | 147 | | 13 | Ijk | 147 | | 14 | Ijk | 852 | | 15 | OPQ | 852 | | 16 | OPQ | 963 | | 17 | OPQ | 741 | | 18 | TPK | 741 | | 19 | TPK | 963 | | 20 | TPK | 963 | | 21 | Wer | 546 | | 22 | Wer | 546 | | 23 | Once | 546 | +----+------+-----+ Rows in Set (0.00 sec) |