Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

What DML Means in SQL: Commands, Examples, and the DDL Difference

DML is the SQL category for retrieving or changing data in existing database objects. Its statement list varies by database, especially for SELECT.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Data manipulation language (DML) is the group of SQL statements used to retrieve or change data stored in existing database objects. Common examples are SELECT, INSERT, UPDATE, DELETE, and MERGE. The exact classification varies by database product: Oracle and SQL Server count SELECT as DML, while PostgreSQL’s documentation treats data retrieval separately from its chapter on data manipulation.

What does DML mean in SQL?

DML stands for data manipulation language. It groups SQL statements by their role: working with the data held in existing tables and other database objects. Oracle defines DML as statements that access and manipulate data in existing schema objects; Microsoft describes DML as statements that affect information stored in a database.

As an Amazon Associate I earn from qualifying purchases.

DML is a way to classify SQL statements, not a separate language you install or run apart from SQL. The specific inventory of statements included under the DML label depends on the database product and its documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What are the common DML commands?

Statement Typical purpose
SELECT Retrieves data from database objects. Oracle and SQL Server classify it as DML; PostgreSQL’s documentation discusses extraction separately.
INSERT Adds rows to a table.
UPDATE Changes values in existing rows.
DELETE Removes rows.
MERGE Conditionally updates rows or inserts rows, depending on whether they meet the statement’s matching conditions.

These statements operate on objects that already exist. For example, INSERT adds data to a table; it does not create the table itself.

How do DML statements look in practice?

This illustrative sequence uses an employees table and columns that must exist in the database where you run it:

SELECT * FROM employees;

INSERT INTO employees (employee_id, last_name)
VALUES (1234, 'Example');

UPDATE employees
SET last_name = 'Updated'
WHERE employee_id = 1234;

DELETE FROM employees
WHERE employee_id = 1234;

The WHERE clauses limit the example update and deletion to a row with the specified employee ID. Without an appropriately restrictive condition, an UPDATE or DELETE can affect more rows than intended.

Is SELECT a DML statement?

There is no single classification shared by every database’s documentation. Oracle explicitly includes SELECT in DML, while noting that it only accesses data. SQL Server’s DML list also includes SELECT. PostgreSQL 16 organizes its documentation differently: its data-manipulation chapter covers insertion, updating, and deletion, and data extraction is covered in a later chapter. Some teaching materials label retrieval separately as query language; treat that as a convention, not a universal SQL rule.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How is DML different from DDL?

DML works with data in existing objects; DDL defines or changes database structures. An INSERT changes table contents, while a statement that creates or alters a table changes the structure. The distinction is useful, but statement categories and transaction rules should be checked against the specific database product.

How do transactions relate to DML?

A transaction can group several DML statements into one logical unit of work—for example, making related balance changes and recording a transfer as a coordinated operation. Oracle states that its DML statements do not implicitly commit the current transaction. Do not assume that this exact commit behavior applies to every database engine or configuration; consult the documentation for the product in use.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why do DML command lists differ by database?

Vendors organize statement categories according to their own products. Oracle’s DML list also includes statements such as CALL, EXPLAIN PLAN, and LOCK TABLE. Microsoft’s SQL Server list includes BULK INSERT and certain text operations. For a general introduction, the common data-retrieval and row-change statements are the most useful starting point; for edge cases, use the relevant vendor’s statement reference.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.