mysql - SQL Where Clause with multiple values -
i have query select name,number table number='123'
what want display multiple records using clause or other way can following data.
name number abc 123 pqr 127 pqr 130
i tried using and
&&
,
in clause.i.e. where number=123,127,130
or where number=123 , 127 , 130
etc. nothing works.
just use in
clause
where number in (123, 127, 130)
you use or (just info, wouldn't use in case)
where number = 123 or number = 127 or number = 130
don't forget round braces around "ors" if have other conditions in clause.
Comments
Post a Comment