mysql where in
The WHERE IN clause in MySQL is used to filter results based on a list of specified values. It allows you to specify multiple values in a list and returns all the records that match any of the values in the list.
Syntax: SELECT column_name FROM table_name WHERE column_name IN (value1, value2, value3,...);
Example: SELECT * FROM employees WHERE department IN ('Sales', 'Marketing', 'Finance');
This query will return all the records from the employees table where the department column contains the values 'Sales', 'Marketing', or 'Finance'.
原文地址: https://www.cveoy.top/t/topic/bhbZ 著作权归作者所有。请勿转载和采集!