Databases SQL Basics Finding the Data You Want Filtering on More than One Condition

Antonio Pala
Antonio Pala
Front End Web Development Techdegree Student 12,353 Points

Am I missing something?

Here is my code:

SELECT * from users WHERE last_name = "Hinkley" OR "Pettit";

And this is the error I get when I submit it for this challenge:

"Expecting two rows, please check that you are checking for both names and they are correct."

I am using the OR keyword, selected all the columns from the correct table and have included both names in quotes.

Please let me know if I am missing something, thank you!

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,164 Points

If you are going to use OR then you need to specify the field name in each condition of your WHERE clause.