SQL Server Interview Question #12
What is DML?
SQL Server Fundamentals Junior Beginner
Detailed Explanation
DML stands for Data Manipulation Language. It is used to insert, update, and delete data stored in tables. Common DML statements include INSERT, UPDATE, and DELETE.
In production systems, UPDATE and DELETE statements should be written carefully because an incorrect or missing WHERE condition can affect many or all rows.
Code Example
INSERT INTO Products (Id, Name, Price)
VALUES (1, 'Laptop', 1200.00);
UPDATE Products
SET Price = 1100.00
WHERE Id = 1;
DELETE FROM Products
WHERE Id = 1;