SQL Syntax for multiple conditions in the same field
Posted
by Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2010-06-14T23:04:41Z
Indexed on
2010/06/14
23:12 UTC
Read the original article
Hit count: 116
mysql
|conditional-statements
I can't seem to find this in the mysql manual:
How do you enter multiple conditions for the same field in a select statement?
e.g.:
SELECT * FROM table WHERE ID = '1, 2, 3, 4'
Is there a way to do this without using this:
SELECT * FROM table WHERE ID = '1' OR ID = '2' OR ID = '3' OR ID = '4'
© Stack Overflow or respective owner