Activity Forums Salesforce® Discussions Can we use two fields in order by clause in Salesforce?

  • Shubham

    Member
    August 3, 2017 at 10:47 am

    Hi shariq

    You may use two field in Order By clause

    But it  sort according to first field

    e.g.

    Select id ,name from Contact Order By name,Phone

    Here it Order according to name

    • This reply was modified 7 years, 3 months ago by  Shubham.
  • Parul

    Member
    September 16, 2018 at 1:51 pm

    Hi

    You may use two field in Order By clause. But it  sort according to first field

    e.g.

    Select id, name from Account Order By name, Phone

    Here it Order according to name

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos