function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

how to display records ?

Hi All


I have 2 lakhs records, out of 2 lakhs i want to display 1 lakh records only? what is the query ?


thanksin adavance




Give limit.


If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.



You can go through the following link which gives information on governor limit for salesforce apex.

Total number of records retrieved by SOQL queries = 50,000.

So If you are writing a query then you can specify limit as 50000.
praveen murugesanpraveen murugesan
Hi Pavan,

You need to use LIMIT in query.

At the moment - max limit is 50K in total. This might be limited further for example if you'll query large textarea fields and run out of heap size before running out of query rows.

list<account> acc = [select id from account limit 50000];

Mark this as best answer if its helps.


Praveen Murugesan.