+ 5
OR Logical Operator
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
5 Respuestas
+ 5
No 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.
+ 5
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
0
both conditions must be met when AND is used to return results
0
no beacuse it will give you the list of customer that lives in both city i.e. New York and Chicago
0
You can use in clause , select * from customers where city in ('New York', 'Chicago') ;