mysql中in如何使用?針對這個(gè)問題,這篇文章詳細(xì)介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問題的小伙伴找到更簡單易行的方法。
in常用于where表達(dá)式中,其作用是查詢某個(gè)范圍內(nèi)的數(shù)據(jù)。
用法:
select * from where field in (value1,value2,value3,…)
舉例:
select * from book where id in (2,4)
not in與in作用相反,用法和示例如下:
用法:
select * from where field not in (value1,value2,value3,…)
舉例:
select * from book where id not in (2,4)
關(guān)于mysql中in如何使用問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道了解更多相關(guān)知識。