Course Process
IN Operator MYSQL
The IN operator allows you to specify multiple values in a WHERE clause.
The IN operator is a shorthand for multiple OR conditions.
Syntax:
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1, value2, …);
or
SELECT column_name(s)
FROM table_name
WHERE column_name IN (SELECT STATEMENT);
Query
SELECT * FROM `employees` where last_name in ('Miara',' Kaiser','Bade')
Output:
As you see it fetched all the records matching given last names
Tester Usage Tips:
- Validate matching records for a set of values