Development questions

What is SOQL and how does it differ from standard SQL (e.g., no SELECT *, no arbitrary table joins)?

DevelopmentEasyTCSInfosysWipro

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 or FIELDS())
  • 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, no DISTINCT-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