0
点赞
收藏
分享

微信扫一扫

Mysql基础第十天,数据过滤

逸省 2022-10-14 阅读 43


1.组合WHERE子句

Mysql基础第十天,数据过滤_操作符

select prod_name,vend_id,prod_price from products where vend_id=1003 and prod_price=2.5;  // 使用and
select prod_name,vend_id,prod_price from products where vend_id=1010 or prod_price>=10; // 使用or
select prod_name,vend_id,prod_price from products where vend_id=1002 and vend_id=1003 or prod_price>=10; // 使用and和or

2.in操作符

Mysql基础第十天,数据过滤_操作符_02

select vend_name,vend_city from vendors where vend_city in ('New York','Lundon','paris');  // in 查询

3. NOT 操作符

Mysql基础第十天,数据过滤_操作符_03

select vend_name,vend_city from vendors where vend_city not in ('New York','Lundon','paris');  // not 查询

4.小结

Mysql基础第十天,数据过滤_操作符_04

感谢观看


举报

相关推荐

python(第十天)

【JavaSE 第十天】

HCIP第十天

第十天学习

web第十天

Python 基础课程第十天

JavaScript的第十天

0 条评论