TA貢獻(xiàn)1810條經(jīng)驗 獲得超5個贊
不一樣,and優(yōu)先級比or高。
or 優(yōu)先級:倒數(shù)第一
and 優(yōu)先級:倒數(shù)第二
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建立或關(guān)系,則需要寫為:
select * from AA where(a>1 or b>1 )and C>1
10+年DBA老司機(jī)帶你輕松玩轉(zhuǎn) SQL
¥ 48.00
舉報
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號