Link to home
Start Free TrialLog in
Avatar of skij
skijFlag for Canada

asked on

MySQL: Simplifiying long list of ORs

Using MySQL, is there a better, faster, more simple way to do this?
SELECT * FROM `x` WHERE `y`=1 OR `y`=2 OR `y`=5 OR `y`=7 OR `y`=8

Something like this?
SELECT * FROM `x` WHERE `y` is (1,2,5,7,8)
ASKER CERTIFIED SOLUTION
Avatar of Haris Dulic
Haris Dulic
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial