Databases Modifying Data with SQL Deleting Data From a Database Removing Specific Rows

Now we're using a database from a smartphone. It has a phone_book table. It has the columns id, first_name, last_name an

DELETE FROM phone_book WHERE first_name ="Jonathan", last_name="Judy",

Why cant we use (,) instead of AND

1 Answer

Steven Parker
Steven Parker
207,993 Points

It's an SQL syntax requirement, but it would also be ambiguous.

The main reason is that it's required by the SQL syntax. You have to "play by the rules".

But if you were allowed to separate conditions with commas, it would not be clear if both conditions should be enforced (as with AND) or just one of the conditions (as with OR).