IN Conditions and LIKE Conditions in MySQL
IN condition is used to match specified values in a query.
Example:-SELECT * FROM employee
where EmployeeID IN(226,211)
will return rows with ID 226 and 211.
LIKELIKE clause is used for pattern matching. It is used in the WHERE clause.
“%” is used as a wild card.
? S% - returns strings starting with S.
? %S - returns strings ending with S.
? %sas% - returns strings with substring as sas.
Example:SELECT * FROM Employee WHERE City LIKE 's%'