mysql中in怎么使用
FXL
2020-09-22 10:45:126663浏览 · 0收藏 · 0评论
in常用于where表达式中,其作用是查询某个范围内的数据。
(推荐教程:mysql数据库学习教程)
用法:
select * from where field in (value1,value2,value3,…)
举例:
select * from book where id in (2,4)
not in与in作用相反,用法和示例如下:
用法:
select * from where field not in (value1,value2,value3,…)
举例:
select * from book where id not in (2,4)
关注公众号,随时随地在线学习
FXL
认证0级讲师