Activity Forums Salesforce® Discussions What is the difference between dynamic and static SOQL in Salesforce?

  • 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.

Popular Salesforce Blogs

Popular Salesforce Videos