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 trial

Databases

Tim Spangler
Tim Spangler
4,827 Points

What 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.

Tim Spangler
Tim Spangler
4,827 Points

Nevermind, I tried between again and it worked. But you wouldn't use between if you want something between AND INCLUDING something.

2 Answers

Steven Parker
Steven Parker
231,271 Points

In 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
Tim Spangler
4,827 Points

Got it, Thanks for the feedback!