function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MMuneeeMMuneee 

I have a account obj and contact obj?i want to retrive the account records?how do u query it?

@anilbathula@@anilbathula@
Hi Muneendar Baddam,

Use this query to retrieve  accounts.
List<Account>acc=[select id,name,type,description from account limit 50000];

Thanks
Anil.B
Deepak Kumar ShyoranDeepak Kumar Shyoran
You can use simple SOQL to get the all accounts or Contact Object.

List<Account> accList = [Select id,Name from Account ] ;
List<Contact> conList = [Select id,LastName from Contact ] ;

in addition you can use additional fields api name to fetch them.