Activity › Forums › Salesforce® Discussions › What is the difference between dynamic and static SOQL in Salesforce? Salesforce® Discussions What is the difference between dynamic and static SOQL in Salesforce? Posted by Anjali on August 26, 2020 at 1:12 PM What is the difference between dynamic and static SOQL in Salesforce? MOHIT replied 5 years, 9 months ago 2 Members · 1 Reply 1 Reply MOHIT Member August 26, 2020 at 1:22 PM Dynamic SOQL: It is used to refer to the creation of a SOQL string at run time with Apex code. Dynamic SOQL enables you to create a more flexible application. To create a Dynamic SOQL query at run time use Database.Query() method, in one of the following ways. Return a single sObjects when the query returns a single record. Static SOQL- The Static SOQL Statement is written in [] (Array Brackets) These statements are similar to IINQ (Ion Integrated Query) Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me