Data Manipulation with Apex

At this point, you have used SOQL to retrieve a set of User records. The last piece of the data manipulation puzzle is the ability to write data through Data Manipulation Language (DML) syntax. Apex has a set of commands that make this final step very simple.

Apex DML Syntax

There are two ways to perform data manipulation requests with Apex. The simplest uses a simple DML statement for each different data manipulation action, including the following:

  • Insert - adds records to a Force Platform database object. The Force Platform automatically creates a unique ID for any record inserted.

  • Update - updates values in an existing record in a Force Platform database object, based on the ID of the record.

  • Delete - deletes records ...

Get The Developer’s Guide to the Force.com Platform 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.