Newer Version Available

This content describes an older version of this product. View Latest

Insert Statement

The insert DML operation adds one or more sObjects, such as individual accounts or contacts, to your organization’s data. insert is analogous to the INSERT statement in SQL.

Syntax

insert sObject

insert sObject[]

Example

The following example inserts an account named 'Acme':

For more information on processing DmlExceptions, see Bulk DML Exception Handling.

Note