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

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

Update Record on Custom Button Using JavaScript on Detail Page

Select and Deselect Check Box on Page Block Table in Visual force Using JavaScript