Databases Modifying Data with SQL Deleting Data From a Database Deleting Data With SQL

Angela Poldervaart
Angela Poldervaart
3,192 Points

Challenge Task: Deleting Data with SQL

The task is:

Now we're using a database from a smartphone. It has a phone_book table. It has the columns id, first_name, last_name and phone. Delete all contacts with the first name of Jonathan and last name of Luna.

I don't know what I'm doing wrong:

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

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

I've tried both but both were wrong.

1 Answer

Steven Parker
Steven Parker
187,427 Points

You were right the first time. I even tested it by pasting your code line directly into the challenge and it passed.

Perhaps you are having a browser issue, try restarting your browser and see if that fixes it.

Angela Poldervaart
Angela Poldervaart
3,192 Points

Now it worked! Good to know that I wasn't wrong :)

Thank you Steven!