IN和ANYSQL中的运算符有什么区别?
IN
ANY
SQL> SQL> -- Use the ANY operator in a WHERE clause to compare a value with any of the values in a list. SQL>
SQL >-您必须在ANY之前放置=,<>,<,>,<=或> =运算符。
SQL> SELECT * 2 FROM employee 3 WHERE salary > ANY (2000, 3000, 4000);
对于输入运算符
SQL> -- Use the IN operator in a WHERE clause to compare a value with any of the values in a list. SQL> SELECT * 2 FROM employee 3 WHERE salary IN (2000, 3000, 4000);
但是使用IN运算符时,不能使用=, <>,<,>,<=或> =