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
2021-10-18 00:52:23
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
下一篇:sql注入trick