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

Can't solve the Challenge 3 of 3.

DELETE FROM phone_book WHERE first_name = "Jonathan" OR last_name = "Luna";

Why doesn't that work??

I have tried in SQL Playgrounds where it does work..

Please help!! :)

Very Best, Johan

Steven Parker
Steven Parker
231,271 Points

You forgot to provide a link to the course page so we can look at the challenge instructions and try it out.

Now I have uploaded the link! Hope you can help. It would be much appreciated!!

Thanks in advance

1 Answer

Steven Parker
Steven Parker
231,271 Points

:warning: Be careful about testing a challenge in the playground.

If you have misunderstood the challenge, it's also very likely that you will misinterpret the results.

In this case, the challenge said, "Delete all contacts with the first name of Jonathan and last name of Luna." You selected both terms in your WHERE clause, but you combined them using OR instead of AND.

So what's the correct answer?

Steven Parker
Steven Parker
231,271 Points

You nearly had it to begin with. Just change the word "OR" to "AND" to make your answer correct.