Tag: SOQL
-
How to emulate EXISTS clause in SOQL
Here is how to emulate the EXISTS clause in SOQL In the example below Education__c is a custom object that has a lookup field to Contact. Suppose you have a query that would be written like this: SELECT Id, Name FROM Contact cn WHERE EXISTS ( SELECT 1 FROM Education__c WHERE Contact__c = cn.Id )…