The IN function helps reduce the need to use multiple
OR conditions.
譯:IN函數有助於減少OR條件的復合使用。
The syntax for the IN function is:
譯:IN函數的語法:
SELECT columns
FROM tables
WHERE column1 in (value1, value2, .... value_n);This SQL statement will return the records where column1 is value1, value2..., or value_n. The IN function can be used in any valid SQL statement - select, insert, update, or delete.
譯:該SQL語句將返回column1的值是value1, value2..., 或者value_n的記錄。IN函數可以用於任何合法的SQL語句中-select, insert, update, or delete。
Example #1The following is an SQL statement that uses the IN function:
譯:下面是一個使用IN函數的SQL語句
SELECT *
FROM supplIEr
WHERE supplIEr_name in ( 'IBM', 'Hewlett Packard',