Jump to content
Question On Between Clause
1 reply to this topic
Posted 10 September 2012 - 02:36 AM
From the book, I learned that the below two queries should return the same result:
SELECT drink_name FROM easy_drinks WHERE main = 'peach nectar' OR main = 'soda';
SELECT drink_name FROM easy_drinks WHERE main BETWEEN 'P' AND main = 'S';
However, when I run the second query on the website, the result set doesn't contain the rows where main = 'soda'. Does anyone know why that is?
Posted 13 May 2013 - 02:53 PM
Hi, the second query should be:
SELECT drink_name FROM easy_drinks WHERE main BETWEEN 'p' AND 't';
You have to use the letter after 's', see p. 108 example.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users