Select All fields in SOQL

Prakher Chaturvedi
2 min readOct 24, 2021

--

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

Query in Query Editor
Query results showing All fields from BatchTest__c object

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.

--

--

Prakher Chaturvedi

Looking for remote opportunities | Salesforce Developer | Lightning Web Components | APEX | 5x Certified | Trailhead Ranger | Content Creator (Medium)