Activity Forums Salesforce® Discussions How Can we use set<id> to limit the number of records returned by a soql query in Salesforce?

  • How Can we use set<id> to limit the number of records returned by a soql query in Salesforce?

    Posted by Anuj on February 4, 2020 at 12:52 pm

    How Can we use set<id> to limit the number of records returned by a soql query in Salesforce?

    Marziya replied 4 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Marziya

    Member
    February 4, 2020 at 1:28 pm

    Hii Anuj,

    LIMIT. LIMIT is an optional clause that can be added to a SELECT statement of aSOQL query to specify the maximum number of rows to return. This query returns the first 125 Account records whose Industry is Media . You can use LIMIT with count() as the fieldList to count up to the maximum specified.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos