NOT IN Operation in Salesforce SOQL

In Salesforce SOQL Query, NOT() and IN() are distinct methods employed. It’s important to note, however, that Salesforce SOQL Query does not utilise a direct NOT IN() function. By tactfully integrating NOT() and IN() together with intended values, an equivalent effect to NOT IN() can be accomplished in the Salesforce SOQL Query. 

NOT() and IN() are two different methods in Salesforce SOQL Query. We don’t have NOT IN() method in the Salesforce SOQL Query.

Sample SOQL:

SELECT Name, Industry
FROM Account
WHERE NOT Industry IN (
'Construction', 'Chemicals',
'Banking', 'Apparel',
'Electronics', ''
)

Output:

Leave a Reply