oracle and 和 or


源地址:https://zhidao.baidu.com/question/350891282.html

(FirstName='Thomas' OR FirstName='William') AND LastName='Carter' 会得到 lastname 必须为 carter ,firstname 为 thomas  或者 william的人 
thomas carter
william carter

FirstName='Thomas' OR FirstName='William' AND LastName='Carter' 可以得到 william carter 或者 firstname 为ithomas lastname 不一定是 carter的人 比如:
thomas carter
william carter
thomas king


就是 or 和and 的先后顺序的问题, and 的优先级比 or的高 ,a or b and c 先计算 b and c 的结果 再去计算 a 的。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM