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

Limitation Of INSERT Statement?

Hi All,

   At a time how many records can we able insert by using INSERT statement ?What is the limitation of inser (or) update (or) delete ?

  Example:   insert account;


Abilash Kosigi 8Abilash Kosigi 8
Checkout this link
James LoghryJames Loghry
In particular, take a look at the "Number of DML Statements Allowed" (150) and the "Total number of records processed as a result of DML statements or database.emptyRecycleBin" (10,000) limit.

To recap, you're limited to a total of 10,000 records per transaction (e.g. loading a page or executing a remote action is a transaction), or 150 DML statements.  Hence why most of us on here harp about performing DML outside of loops and bulkifying triggers.

If you need to get around the 10,000 record limit though, you can also consider breaking those records up by passing them into a batch class if necessary.