Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTim Spangler
4,827 PointsWhat is going on with with this code challenge? Asking for prices between and including 10.99 and 12.99.
Should be
SELECT * FROM products WHERE price >= 10.99 and price <= 12.99;
but its do working. I even tried between, which shouldn't be right because its between AND INCLUDING but figured why not.
2 Answers
Steven Parker
231,248 PointsIn SQL, the word BETWEEN
is inclusive.
So it actually does mean "between and including". That might seem odd at first, but remember, SQL was developed for accountants, not mathematicians.
Tim Spangler
4,827 PointsGot it, Thanks for the feedback!
Tim Spangler
4,827 PointsTim Spangler
4,827 PointsNevermind, I tried between again and it worked. But you wouldn't use between if you want something between AND INCLUDING something.