SQL WHERE IN Clause
- WHERE IN returns values that matches values in a list or sub-query.
- WHERE IN is a shorthand for multiple OR conditions
The SQL WHERE IN syntax
The general syntax is:
- SELECT column-names FROM table-name WHERE column-name IN (values)
SQL WHERE IN Examples
mysql> select name from person where age in(26);
+-----------------+
| name |
+-----------------+
| shantanu biswas |
| sudip saha |
+-----------------+
2 rows in set (0.00 sec)
+-----------------+
| name |
+-----------------+
| shantanu biswas |
| sudip saha |
+-----------------+
2 rows in set (0.00 sec)
Comments
Post a Comment