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

Find name with first letter L

I am getting you are missing value of %l%

2 Answers

Ari Misha
Ari Misha
19,323 Points

Hiya there! To search a pattern in SQL, LIKE clause is your friend. But to search a first name that starts with a certain alphabet, say L , you can phrase your pattern like this .... WHERE name LIKE "L%";. I hope it helped!

~ Ari

In order to do this... you should say the following:

'''SQL

SELECT * from <TableName> where name like "L%";

'''

It will search for names that starts with L and has some characters after it As for %l% that you wrote, it means that you will look for names that contains L. Doesn't matter if it is before the letter L or After it.