I want to select the 3rd row from the mysql table.
Note: the table is updated frequently. How to select always the 3rd row from column one.
SELECT *
FROM
(
SELECT *
FROM emps
ORDER BY empid
LIMIT 3
) AS T
ORDER BY empid DESC
LIMIT 1
尝试这个::
Select * from tableA order by empid desc limit 3,1
The offset of LIMIT clause is Zero based. Try this:
SELECT *
FROM emps
ORDER BY empid
LIMIT 2, 1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.