开发者

What is mysql query to fetch 99 th record in Table?

开发者 https://www.devze.com 2023-03-05 04:37 出处:网络
Suppose we have table name called \"Person\" having some column name Like \"Firstname\",\"LastName\",\"OrderId\".

Suppose we have table name called "Person" having some column name Like "Firstname","LastName","OrderId".

Table has 100 rows in DB,I want to fetch 99 th row from the Table Person.

Kindly give mysql query.

Thanks in advance,

Dinesh Kum开发者_运维技巧ar Manoharan


Try this -

select * from Person limit 98,1

If you want to order by,

select * from Person order by columnName limit 98,1


Assuming you wish to order them by OrderId:

SELECT * FROM Person ORDER BY OrderId LIMIT 1 OFFSET 98


SELECT * FROM Person LIMIT 98, 1

First row is 0.

Make sure to order it by something.

0

精彩评论

暂无评论...
验证码 换一张
取 消