Difference between Delete() and DataBase.delete() in Salesforce

Difference between Delete() and DataBase.delete() in Salesforce


Delete
Database.Delete
Delete doesn’t return any values.
Database.delete returns a list of results so that you can identify
the problems.
If there are problems you will get a DMLException and the transaction
will be rolled back.
It returns values which are deleted successfully and which are failed
in deleting.

Leave a Reply