Saturday, 23 July 2011

MySQL LIMIT is Not working

Case Studies:-
I got question that LIMIT is not working properly,but actually as per the manual kit of mysql LIMIT work like below :

The first parameter indicates the starting record (first record is 0). The second parameter is the number of records to return, NOT the last record to return.

LIMIT 0, 10
This will return 10 records starting at record 0 (i.e. 0 - 9)

LIMIT 10, 20
This will return 20 records starting at record 10 (i.e. 10 - 29)

LIMIT 10, 10
This will return the 10 records starting at record 10 ( 10 - 19).


Example :--
select * from dbName.emp limit 10,10;




Posted By:-javadevelopersguide
Follow Link-http://javadevelopersguide.blogspot.com