Tell MySQL what offset to use, from which result to start limiting.
mysql>
mysql>
mysql> CREATE TABLE sales_rep(
-> employee_number INT,
-> surname VARCHAR(40),
-> first_name VARCHAR(30),
-> commission TINYINT
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql>
mysql> INSERT INTO sales_rep values(4,'Rive','Mongane',10);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO sales_rep values(5,'Smith','Mike',12);
Query OK, 1 row affected (0.00 sec)
mysql>
mysql>
mysql> SELECT first_name,surname,commission FROM sales_rep ORDER BY commission DESC LIMIT 1,1;
+------------+---------+------------+
| first_name | surname | commission |
+------------+---------+------------+
| Mongane | Rive | 10 |
+------------+---------+------------+
1 row in set (0.00 sec)
mysql>
mysql> drop table sales_rep;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category