+ 4
can we use multiple conditions in single WHERE. ..?
SELECT * FROM customers WHERE id>= 2 AND id <=8 , Age >= 35 AND Age<=40 ;
25 Answers
+ 6
yes you can, but they need to be separated by a logical operator ( ie OR, AND ...) also be careful with the order of the conditions using brackets to nest properly
+ 3
Yes , You can get multiple condition using seperator by boolean operators like AND , OR , NOT.
+ 2
yes, you just need to be aware of how your conditionals are grouped. you would want your where statement to look more like one of these
...
WHERE (id BETWEEN 2 AND 8) AND (Age BETWEEN 35 AND 40) --if your database is configured to include the outer values in the result set
WHERE (id >= 2 AND id <= 8) AND (Age >= 35 AND Age <= 40) -- if your database will not include the outer values of a between statement in the result set or you aren't sure whether it does
+ 1
yes
+ 1
Yes you can use
+ 1
yes
+ 1
yes ofcourse
0
yes
0
Yes
0
yes.
0
yes
0
yes
0
yes
0
yeah
0
yeah ... obviously
0
sure
0
yes by using And, Or & Not.
0
Yes
0
yes u can
0
yes