TA贡献1810条经验 获得超5个赞
不一样,and优先级比or高。
or 优先级:倒数第一
and 优先级:倒数第二
select * from AA where a >1 or b>1 and C>1
等同于:
select * from AA where a >1 or (b>1 and C>1 )
如果你只想a>1和c>1建立或关系,则需要写为:
select * from AA where(a>1 or b>1 )and C>1
10+年DBA老司机带你轻松玩转 SQL
¥ 48.00
举报
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号