+ Start a Discussion
SFDC_DevloperSFDC_Devloper 

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;

Thanks

Abilash Kosigi 8Abilash Kosigi 8
Checkout this link

http://www.salesforce.com/us/developer/docs/dbcom_apex/Content/apex_gov_limits.htm
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.