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 trialMotuma Kaba
11,960 PointsSQL Query question i would not understand. Please help.
Here is the question: In the users table we have the columns id, username, password, first_name and last_name. Find all users with the first name starting with the letter "L".
I tried answering it this way but is not correct.
SELECT*FROM users WHERE first_name LIKE ("%L");
2 Answers
Laura Kyle
19,794 PointsYou're so close! The % should go after the "L". Remember that the "%" is the wildcard, it goes where you're not sure what the content actually is. So if it starts with "L", then use "L%" as you're not sure what follows.
SELECT * FROM users WHERE first_name LIKE ("L%");
Amr Aly
5,201 Points("Here-Starts-with%") ("%Here-Ends-with")
Motuma Kaba
11,960 PointsI understand the difference now, thank you so much!
Motuma Kaba
11,960 PointsMotuma Kaba
11,960 PointsThat answered and cleared confusion. Thank you so much for your help.