MySQL – Select From Certain Record To The Last Record


To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:

SELECT * FROM tbl LIMIT 96, 18446744073709551615;

 

18446744073709551615 is 2^64-1 for those who were wondering. You may want to watch out because you won’t be able to store this value in an 32 bit integer. You have to make sure you store this as a string to ensure compatibility

18446744073709551615 is the maximum value of unsigned BIGINT

 

source:

http://stackoverflow.com/questions/255517/mysql-offset-infinite-rows

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s