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 trialMonica Dhulipudi
4,075 PointsNow 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
231,271 PointsIt'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
).