首页 > 数据库技术 > 详细

mysql and or优先级

时间:2021-08-30 13:17:57      阅读:18      评论:0      收藏:0      [点我收藏+]

and优先级高于or,

不使用()情形:or后仍遇到and时,先算and再算or

select * from table1 where f1=1 and f2=2 or f3=3 and f4=4 or f5=5 等价于 select * from table1 where (f1=1 and f2=2) or (f3=3 and f4=4) or f5=5

mysql and or优先级

原文:https://www.cnblogs.com/navigate/p/15196277.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!