Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

判斷運算式的值是否和指定清單中的其中一個值相等。

語法

expr [Not] In(value1, value2, . . .)

備註

In 運算子語法由下列各部分組成:

部分

描述

expr

針對您想要評估的資料識別所屬欄位的運算式。

value1, value2

您想要評估 expr 的運算式或運算式清單。


若值清單中有 exprIn 運算子就會傳回 True;沒有的話,則會傳回 False。 您可以包含 Not 邏輯運算子來評估相反的情況 (也就是 expr 的結果不在值清單中時)。

例如,您可以使用 In 來判斷哪些訂單運送到多個特定區域:

SELECT *
FROM Orders
WHERE ShipRegion In (‘Avon’,’Glos’,’Som’);



Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×