if you want to find the customers who live either in New York or Chicago, the query would look like this SELECT * FROM customers WHERE City = 'New York' OR City = 'Chicago'; Can I also use the AND Operator Since it Satisfies all The Given Conditions
6/21/2018 2:43:08 PM
Akande Seun5 Answers
New AnswerNo because that would not look for customers that live in New York or Chicago it would look for customers who live in Chicago AND New York.
AND is used whenever both the condition or choice are right...means if AND used in between Chicago and New York then it's means person live in both places
no beacuse it will give you the list of customer that lives in both city i.e. New York and Chicago
You can use in clause , select * from customers where city in ('New York', 'Chicago') ;
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message