views:

46

answers:

2

Hey Guys,

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 to write that kind query?

+1  A: 

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.

Oren
+1  A: 

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.

Sjoerd
but my problem is...that my data is coming in group by.. so if i add any new field in the database then also...it wont work..
Nitz