高级数据过滤
组合WHERE语句
AND操作符
SELECT prod_id, prod_price, prod_name FROM products WHERE vend_id = 'DLL01' AND prod_price <=4;
OR操作符
SELECT prod_id, prod_price, prod_name FROM products WHERE vend_id = 'DLL01' OR prod_price <=4;
求值顺序
先求AND 再求OR
IN操作符
SELECT prod_id, prod_price, prod_name FROM products WHERE vend_id IN ('DLL01', 'BRS01');
ORDER BY prod_name;
NOT操作符
SELECT prod_id, prod_price, prod_name FROM products WHERE NOT vend_id IN = 'DLL01' ORDER BY prod_name;
无欲则刚 关心则乱