Select All fields in SOQL
Whoever has switched from SQL to SOQL, has always missed the magical asterisk (*) with Select statement in SOQL.
We can use Select Fields(ALL) from Object Limit 200
You can use this query as an alternative to SELECT * in SOQL and it works as expected showing all fields in the result. You can also use FIELDS(STANDARD) and FIELDS(CUSTOM) when you want only standard or custom fields in result of your query.
How Can You Contribute?
- Connect with me on Linkedin/Twitter
- Endorse me on Linkedin for Salesforce
- Reach me out on LinkedIn, if my knowledge in salesforce can help you.
Posts in the previous series :
Salesforce Development — Learning Apex Programming, VisualForce, Lightning Components
First Step toward Learning Apex Programming
Day 2 in Apex — Writing apex codes
Working with sObjects, SOQL, and SOSL
Understanding Salesforce Triggers and working with them
Apex Test classes and methods
Understanding VisualForce Concepts
Controllers in VisualForce
Modifying System Fields (LastModifiedDate and CreatedDate) for Test classes in Salesforce Apex
Create related records while loading data from CSV in Apex test class
Filter SOQL query on Text Area Long Field in Apex