Server version: 5.6.47 MySQL Community Server (GPL)
1.AND操作符
SELECT prod_id,prod_price,prod_name FROM Products WHERE vend_id='DLL01' AND prod_price<=4;
2.OR操作符
SELECT prod_name,prod_price FROM Products WHERE vend_id='DLL01' OR vend_id='BRS01';
3.求值顺序
SELECT prod_name,prod_price FROM Products WHERE vend_id='DLL01' OR vend_id='BRS01' AND prod_price>=10;
SELECT prod_name,prod_price FROM Products WHERE (vend_id='DLL01' OR vend_id='BRS01') AND prod_price>=10;
4.IN操作符
SELECT prod_name,prod_price FROM Products WHERE vend_id IN ('DLL01','BRS01') ORDER BY prod_name;
SELECT prod_name,prod_price FROM Products WHERE vend_id='DLL01' OR vend_id='BRS01' ORDER BY prod_name;
5.NOT操作符
SELECT prod_name FROM Products WHERE NOT vend_id='DLL01' ORDER BY prod_name;
SELECT prod_name FROM Products WHERE vend_id <> 'DLL01' ORDER BY prod_name;