Fetch All Account in SOQL without any Contacts.

Fetch All Account in SOQL without any Contacts.

List<Account> lst=[SELECT Id 
                   from Account where ID NOT IN
                   (Select AccountID from Contact) limit 1];

system.debug('lst****'+lst);

Comments

Popular Post

Send SMS Using Batch Class in Salesforce

Create Custom Lookup in salesforce

Roll Up Amount on Parent Object from Child Object In Lookup Relationship