How to find total number of records using soql in Salesforce

Sample Code:

Integer counter = [ Select count()
                                                  FROM Member__c
                                                                                 Where Age__c > 40];

System.debug('Total Number of records: ' + counter);

No comments:

Post a Comment