Monday, November 19, 2012

Limit - MySQL Command

Limit is used to limit your MySQL query results to those that fall within a specified range. It is use for select number of row of record from your query.

your table record : 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

SELECT * FROM 'YourTable' Limit 10
- It will select 10 rows of record from the table.

Result : 1,2,3,4,5,6,7,8,9,10


SELECT * FROM 'YourTable' LIMIT 0, 3 
- It will return 3 rows of record and start from index 0

Result : 1,2,3


SELECT * FROM 'YourTable' LIMIT 2, 3 
- It will return 3 rows of record and start from index 2

Result : 3,4,5

3 comments:

Singer Lee said...

This amazing internet site undoubtedly provides all of the details I wanted regarding this subject as well as didn’t understand who have individuals. buy and sell runescape accounts
rs accounts for sell
buy and sell runescape accounts
runescape accounts sale
runescape accounts buy
rs accounts for sell
buy and sell runescape accounts
runescape accounts sale
runescape accounts buy

GuildWars2Items said...

Ability may get you to the top, but it takes character to keep you there, RuneScape Gold to change your future, alter your decisions today, RS Gold. Life is not measured by the number of breaths we take, but by the moments that take our breath away RS2 Gold.

Suppose someone gave you a pen — a sealed, solid-colored pen.You could not see how much ink it had D3 Gold, think Positive Thoughts Every Day Buy D3 Gold, the brightest future will always be based on a forgotten past, you can't go on well in life until you let go of your past failures and heartaches Cheap D3 Gold

microsoft certifications said...

I can see that you are are genuinely passionate about this! I am trying to build my own website and youve helped me with some great information
http://www.sqlservermasters.com/