日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無(wú)先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

sql語(yǔ)句:and與or的優(yōu)先級(jí)

作者:黃佳俊、 更新時(shí)間: 2022-02-04 編程語(yǔ)言

and的優(yōu)先級(jí)大于or 我這里寫(xiě)大括號(hào)方便區(qū)分,表示兩個(gè)條件或兩個(gè)條件 可以省略括號(hào)
?

select device_id,gender,age,university,gpa from user_profile
where (university='山東大學(xué)' and gpa>3.5 )
or (university="復(fù)旦大學(xué)" and gpa>3.8);

等效于

select device_id,gender,age,university,gpa
from user_profile
where university='山東大學(xué)' and gpa>3.5 or university='復(fù)旦大學(xué)' and gpa>3.8

原文鏈接:https://blog.csdn.net/weixin_48419914/article/details/122278971

欄目分類(lèi)
最近更新