SalesforceSalesforce Object Query Language (SOQL)


Syntax

  • SELECT Id FROM Account
  • SELECT Id, Name FROM Account
  • SELECT Id FROM Account WHERE Name = 'SomeAccountName'
  • SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Account
  • SELECT Id, Name FROM Account WHERE Id = :apexVariableName