ApexBeginnerdmlinsertupdate
What is DML in Apex?
Real World Scenario
After processing Opportunities, you need to create Tasks. You explain DML operations.
Expected Answer
• DML (Data Manipulation Language) operations insert, update, upsert, delete, undelete records
• Use lists for bulk DML—one insert accountsList instead of many single inserts
• DML fires triggers on affected objects in the same transaction
• Partial success options exist but default is all-or-nothing per transaction
• Governor limits cap DML rows and statements per transaction
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Insert or update in one call using external ID or Id. Useful for integrations that may create or update records.
Architect Perspective
Pair DML with triggers firing—shows you think about side effects, not just syntax.