-
第5课 高级数据过滤
- 5.1 组合WHERE子句
- 5.1.1 AND操作符
- SELECT prod_id, prod_price, prod_name
- FROM products
- WHERE vend_id = 'DLL01' AND prod_price <= 4;
- 5.1.2 OR操作符
- SELECT prod_name, prod_price
- FROM products
- WHERE vend_id = 'DLL01' OR vend_id = 'BSRS01';
- 5.1.3 求值顺序
- SELECT prod_name, prod_price
- FROM products
- WHERE (vend_id = 'DLL01' OR vend_id = 'BRS01')
- AND prod_price >= 10;
- 使用圆括号对操作符进行明确分组。
- 5.2 IN操作符
- SELECT prod_name, prod_price
- FROM products
- WHERE vend_id IN ('DLL01', 'BRSS01')
- ORDER BY prod_name;
- 5.3 NOT操作符
- SELECT prod_name
- FROM products
- WHERE NOT vend_id = 'DLL01'
- ORDER BY prod_name;
- 5.4 小结
- 这一课讲授如何用AND和OR操作符组合成WHERE子句,还讲授了如何明确地管理求值顺序,
- 如何使用IN和NOT操作符。
-
相关阅读:
我开博客了,啦啦啦.
cf593div2
Comet OJ
cf591div2abc
cfround586ac
cf589div2
cf573div2
Codeforces Round #569 (Div. 2)
uva11729 水题
luogu1984 [SDOI2008] 烧水问题
-
原文地址:https://www.cnblogs.com/xuxaut-558/p/10285728.html
Copyright © 2020-2023
润新知