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 的。
原文地址:https://www.cnblogs.com/haizine/p/6141193.html