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 trialGangadhar V
3,037 Pointshow to filter the results to show only names starting with A through K
how to filter the results to show only names starting with A through K
3 Answers
Remylus Losius
7,394 PointsHey Gangadah,
I think the < (Less) and > (Greater) than sign with the WHERE clause will work.
WHERE name < "L" --> will return all names between A-K.
For example
SELECT first_name, last_name, age
FROM phone_book
WHERE last_name < "L" ;
Hope it works.
ivana kantnerova
15,932 PointsSELECT Name FROM Employees WHERE Name LIKE '[A-K]%'
Remylus Losius
7,394 PointsHi Avana, I think your filter works in MySQL but not SQLite which Treehouse workspaces uses by default.
ivana kantnerova
15,932 Pointsok, you are right, sorry