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

chris lightfoot
10,217 PointsCode Challenge: Querying Tables 4/4
Hi I need a little help on the code challenge:querying tables i am on part 4/4 it asks you to "Select all actors whose name starts with "Tom"." please find the code below the i inputted:
SELECT * FROM movies WHERE actors LIKE "%Tom%";
Thanks chris :)
8 Answers

Gordon Jiroux
8,728 Points@Chris
Rmove the % (percent symbol) that's before Tom
the percent sign is a wildcard... what you wrote looks for "Tom" somewhere in the middle. What you want "Start's with". Additionally, I think from what the question states, you should be looking in the "Actors" table, not "Movies"
try this
SELECT * FROM actors WHERE name LIKE "Tom%";

chris lightfoot
10,217 Pointsnope gordon that didnt work its throwing up an error "SQL Error: no such column: actors "

Gordon Jiroux
8,728 PointsI just edited my reply... You are "Selecting" from the wrong table... sorry, I didn't catch it when I first replied... look above, for my changees.
I was editing my reply, while you were trying the original :)

Ernest Grzybowski
Treehouse Project ReviewerGordon Jiroux nailed it. If you include a wildcard before Tom then you are allowing the result set not to start with Tom. Since the question states that it must start with Tom, you must be able to realize that it can end with anything. Also known as, a wildcard (%).

chris lightfoot
10,217 Pointscheers guys :) i love this forum, next stop for us TO TAKE OVER THE WORLD lol :)

Gordon Jiroux
8,728 Points"Pinky and the Brain" Style :) "What are we going to do Brain?"... "Same thing we do every day Pinky... Try and take over the world"
No problem chris lightfoot ... Always glad to help

chris lightfoot
10,217 Pointsi didnt think anyone would pick up on that, used to love pinky and the brain as a kid lol :) thanks again gordon. just spotted your score as well 6,207. mines only 3,615 :( got a lot of things to learn to catch up with you.

Gordon Jiroux
8,728 PointsYou'll get there Chris.. Just keep on truckin'