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