The delete DML operation
deletes one or more existing sObject records, such as individual accounts or contacts, from your
organization’s data.delete is analogous to the delete() statement in the SOAP API.
Syntax
delete sObject | Record.ID
Example
The following example
deletes all accounts that are named 'DotCom':
Account[] doomedAccts = [SELECT Id, Name FROM Account
WHERE Name = 'DotCom'];
try {
delete doomedAccts;
} catch (DmlException e) {
// Process exception here
}