Activity Forums Salesforce® Discussions Can we use aliasing in Salesforce?

  • MOHIT

    Member
    February 11, 2020 at 6:41 pm

    SOQL has very limited aliasing support. We can alias the table, e.g. SELECT a.name FROM Account a, but that's of very little use. In most contexts, we cannot alias fields.

    The one exception is for queries that use aggregations, like SELECT COUNT(Id) recordcount FROM Account allows us to alias the result of the aggregation from it's default expr0 to recordCount.

    • This reply was modified 4 years, 9 months ago by  Forcetalks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos