What is difference between ' between function' and limit? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is difference between ' between function' and limit?

26th Mar 2016, 5:38 AM
Rama Chandran
Rama Chandran - avatar
3 Answers
+ 3
between is used with where clause but limit can used with out where clause
5th Apr 2016, 4:32 PM
Omi Singh
+ 2
BETWEEN is used to select/filter entries with a certain interval of values of an attribute with a continuous range, like numbers or dates. For example, you want to see all customers between the ages of 18 and 30. Your query will look like: SELECT name, age FROM customers WHERE age BETWEEN 18 AND 30 LIMIT is used to show only a certain amount of results out of all the results of your query. Say, we got 200 results from the previous query, but we only want to see the first 25. For that you just add LIMIT to your query like: SELECT name, age FROM customers WHERE age BETWEEN 18 AND 30 LIMIT 25 and you'll see only the first 25 entries matching your WHERE criteria.
1st Aug 2016, 6:11 AM
MrAwesome
0
By using Between you can give a range from starting number to end. But Limit is different than Between. By using Limit you can select top n rows from the table.
13th Apr 2016, 10:14 AM
Nilesh Pawar