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 trialdavid diaz
1,784 PointsWHY I GOT AN ERROR EVERYTIME TYPE SELECT * FROM users WHERE last_name = "Hinkley"OR "Pettit";
Now we're in the e-commerce database. In the users table we have the columns id, username, password, first_name and last_name. Find all users with either the last name "Hinkley" or "Pettit"
SELECT * FROM users WHERE last_name = "Hinkley"OR "Pettit";
2 Answers
Steven Parker
231,261 PointsYou're very close! But you can't combine elements on one side of a test like that. Try it this way:
SELECT * FROM users WHERE last_name = "Hinkley" OR last_name = "Pettit";
Or this way (I may be getting ahead of your point in the course here):
SELECT * FROM users WHERE last_name IN ("Hinkley", "Pettit");
Victor Rivera
827 PointsSteven, that is a great approach, I have been stock on this for over 45 minutes I was making the same mistake. You rule!
david diaz
1,784 Pointsdavid diaz
1,784 PointsTHANK YOU VERY MUCH I'VE BEEN STUCK IN THIS PART FOR 30 MIN OR SO