Example 1: The table has a primary key (a field that can be uniquely identified) and the field is of the numerical type.
Example 1 test data/* Table Structure */
Drop table if exists 't1 ';
Create table if not exists 't1 '(
'Id' int (1) not null auto_increment,
'Name' varchar (20) not null,
'Add' varchar (20) 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 "),
('Wher', "546 "),
('Wher', "546 "),
('Server', "546 ");
Select * from 't1 ';
+ ---- + ------ + ----- +
| Id | name | add |
+ ---- + ------ + ----- +
| 1 | abc| 123 |
| 2 | abc| 123 |
| 3 | abc| 321 |
| 4 | abc| 123 |
| 5 | xzy | 123 |
| 7 | xzy | 456 |
| 6 | xzy | 456 |
| 8 | xzy | 456 |
| 9 | xzy | 789
| 10 | xzy | 987 |
| 11 | xzy | 789 |
| 12 | ijk | 147 |
| 13 | ijk | 147
| 14 | ijk | 852 |
| 15 | ops | 852 |
| 16 | ops | 963 |
| 17 | opq | 741 |
| 18 | tprimary | 741 |
| 19 | tprimary | 963 |
| 20 | tprimary | 963 |
| 21 | Lower | 546 |
| 22 | Lower | 546 |
| 23 | once | 546 |
+ ---- + ------ + ----- +
23 rows in set (0.00 sec) 1 2 3 4