not> and> or
where (A=1 or B=2) and C is not null
上面查的是 C不是null 并且 A=1or B=2
where A=1or B=2 and C is not null
上面查的是 C不是null 或则 A=1 或则 B=2
第一句不会查出 C=null的情况的。
第二句就会查出 C=null (只要符合A=1就能被查出)
第二句 会先查 B=2 and C is not null 的结果。然后再与 A=1运算。因为and>or
where (A=1 or B=2) and C is not null
上面查的是 C不是null 并且 A=1or B=2
where A=1or B=2 and C is not null
上面查的是 C不是null 或则 A=1 或则 B=2
第一句不会查出 C=null的情况的。
第二句就会查出 C=null (只要符合A=1就能被查出)
第二句 会先查 B=2 and C is not null 的结果。然后再与 A=1运算。因为and>or