Salesforce Select * is finally here (kindof)

So I have long been frustrated by the lack of support in SOQL (Salesforce Object Query Language) for *. SELECT * is a pretty standard way in SQL to get all fields from a table or record etc. Sure it is not always the most performant and I would not reccomend using SELECT * in your code, but when your troubleshooting database issues it can be a lifesaver. This is especially true when you’re querying certain objects on the Salesforce platform like Knowledge__ViewStat which is hidden from the Object Manager. But now you can use the new Salesforce function FIELDS() to get all the fields from an obeject in a SOQL query. Thank you Salesforce for finally making this happen!

FIELDS(ALL) - Will get all fields
FIELDS(STANDARD) - Will get all standard fields
FIELDS(CUSTOM) - Will fetch all custom fields.

Example queries

SELECT FIELDS(ALL) FROM Account LIMIT 200

SELECT FIELDS(ALL) FROM KnowledgeArticleViewStat WHERE ID IN ('1234567890','0987654321') LIMIT 200 



Checkout the full blog from Salesforce here.
https://developer.salesforce.com/blogs/2021/01/new-soql-fields-function-is-ga