Google News
logo
Salesforce - Interview Questions
Explain the types of SOQL statements in Salesforce.
The Salesforce Object Query Language or SOQL is employed in querying the records from database.com as and when required. The two types of SOQL statements are as follows:
 
Static SOQL : It is written using [] (array brackets) and is similar to IINQ (Ion Integrated Query). It is suitable when there are no dynamic changes in the SOQL query. 

Dynamic SOQL : It is suitable for referring to the SOQL string creation at run time with Apex code. It allows the creation of more flexible applications. For instance, you can create a search based on updated records or end-user input with varying field names.
Advertisement