Development questions
What is SOQL and how does it differ from standard SQL (e.g., no SELECT *, no arbitrary table joins)?
SOQL (Salesforce Object Query Language) queries records from Salesforce objects, similar to SQL SELECT but object-oriented.
Differences from SQL:
- No
SELECT *(use explicit fields orFIELDS()) - No arbitrary joins; only relationship queries (child-to-parent dot notation, parent-to-child subqueries) along defined relationships
- Read-only: no INSERT/UPDATE/DELETE statements (DML is separate)
- Limited functions, no
UNION, noDISTINCT-style joins; no arbitrary aliases for tables in the same way - Subject to governor limits and security (sharing, FLS)
soql
SELECT Id, Name, Account.Name FROM Contact WHERE LastName LIKE 'S%'
soqlfundamentals
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?