Activity Forums Salesforce® Discussions What is the Ascending order of a checkbox in a Dml with ORDER BY clause in SOQL ?

  • What is the Ascending order of a checkbox in a Dml with ORDER BY clause in SOQL ?

    Posted by Nikita on August 22, 2019 at 6:06 am

    What is the Ascending order and Descending order of a checkbox in a Dml with ORDER BY clause in SOQL and Why?

    Saddam replied 4 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Saddam

    Member
    August 22, 2019 at 9:40 am

    Hi Nikita,

    ORDER BY Clause is used to retrieve the data in  “Ascending” or “Descending” order by the condition given in SOQL Statement.

    In salesforce ORDER BY clause are two types. They are

    ASC.
    DESC.
    Here ASC means ascending and DESC means descending order. In SOQL by default the data will be retrieved in ascending order only.

    SELECT name, Amount FROM opportunity ORDER BY name ASC.

    SOQL ORDER BY CLAUSE DESC.
    SELECT name, Amount FROM Opportunity ORDER BY name DESC

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos