I have a table of 1000 records of data. If i want to get data of rows from 501 to 700 from the table without using any condition what I have to do.Please suggest a solution.
I guess you can use LIMIT
like this :
SELECT * FROM my_table
LIMIT 500,200; -- get data of rows from 501 to 700
Moreover, you should not rely data to be sorted with primary key by default, so add an ORDER BY statement :
SELECT * FROM my_table
ORDER BY primary_key
LIMIT 500,200; -- get data of rows from 501 to 700