Data manipulation on the Force.com platform
DML statements allow users to retrieve, insert, delete, and update sObject data in the Force.com database. Apex has a set of DML commands, as follows, which can take a single sObject or a list of sObjects:
insert
: This command is used to add records to the particular Force.com database object. The ID is automatically generated for a record while executing this command.update
: This command is used to update fields of an existing record in the Force.com database object. The update is based on the ID of the particular record.upsert
; Based on the ID field, this command can either insert or update the particular records. If the record has a value for the ID field, then the record will be updated, and if the ...
Get Learning Force.com Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.