Explore Courses Blog Tutorials Interview Questions
+1 vote
1 view
in Salesforce by (11.9k points)

I was going through the SOQL documentation, but couldn't find query to fetch all the field data of an entity say, Account, like

select * from Account [ SQL syntax ]

Is there a syntax like the above in SOQL to fetch all the data of account or the only way is to list all the fields ( though there are a lot of fields to be queried )


1 Answer

+3 votes
by (32.1k points)
edited by
Best answer

If you want a feature like select * from table_name which a syntax code from SQL, SOQL doesn’t support anything like that. You’ll need to use the following code for the same:

Are you interested in learning Salesforce from scratch! Have a look at this interesting video on Salesforce provided by Intellipaat:

SObjectType accountType=Schema.getGlobalDescribe().get(‘Account’); Map<String,Schema.SObjectField>mfields=accountType.getDescribe().fields.getMap();

Browse Categories