Last answered:

18 Nov 2024

Posted on:

17 Nov 2024

0

Resolved: About min() and limit

Why we used Min() and why we didn't use" between " Instead of limit ?

I need a explain

1 answers ( 1 marked as helpful)
Instructor
Posted on:

18 Nov 2024

0
Hi Mido!
Thanks for reaching out.

We use it to extract just one department number. If we didn't, we would have obtained all of them, thus getting more records than we need. We use LIMIT to restrict the number of rows returned, while BETWEEN filters rows based on a range of values. They're not interchangeable because LIMIT controls quantity, and BETWEEN defines conditions.


Hope this helps.
Best,
Tsvetelin

Submit an answer