开发者

How to get data from database but from the exact row?

开发者 https://www.devze.com 2022-12-28 18:41 出处:网络
I am using mysql. Now I want to write that query in which i will give mysql the row number then mysql will data from that column no only.

I am using mysql. Now I want to write that query in which i will give mysql the row number then mysql will data from that column no only.

means..

if i have twenty rows in database but i want to get only 10th no of rows data? so how开发者_如何学C to write that kind query?


Create an INT field named "ID" that is set to "Auto Increment." This way each row will have a unique ID that you can use to select it. Details about how to do this are located here.


Add a column with the AUTO_INCREMENT flag on it, so that this columns contains the row number for all your rows. MySQL does not really have support for fetching a row by number, only by column value.

0

精彩评论

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