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 posts from this blog

Salesforce Spring 16 Release Exam (Maintenance Exam Q&A) for Developer 201 Admin

Show Hyper Link On Add Error in Salesforce Trigger

Show the Success Message before Redirecting the Detail page on Visualforce Page