0% found this document useful (0 votes)
206 views2 pages

1 DDL-DML

DDL (Data Definition Language) is used to define and manage database structures, such as creating and altering tables, while DML (Data Manipulation Language) is used to manipulate the actual data within those structures, including inserting, updating, and deleting records. DDL commands are executed less frequently and typically by database administrators, whereas DML commands are more common and executed by developers or end-users. Key DDL commands include CREATE and DROP, while key DML commands include INSERT and UPDATE.

Uploaded by

vasradinesh32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
206 views2 pages

1 DDL-DML

DDL (Data Definition Language) is used to define and manage database structures, such as creating and altering tables, while DML (Data Manipulation Language) is used to manipulate the actual data within those structures, including inserting, updating, and deleting records. DDL commands are executed less frequently and typically by database administrators, whereas DML commands are more common and executed by developers or end-users. Key DDL commands include CREATE and DROP, while key DML commands include INSERT and UPDATE.

Uploaded by

vasradinesh32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DDL & DML

DDL is Data Definition Language that is used to define data


structures. For example: create table, alter table are instructions in
SQL. DML is Data Manipulation Language that is used to manipulate
data itself. For example: insert, update, and delete are instructions in
SQL.
The difference between DDL and DML:

DDL DML
It stands for Data Definition It stands for Data Manipulation
Language. Language.

It is used to create database


It is used to add, retrieve or
schema and can be used to define
update the data.
some constraints as well.

It add or updates the row of the


It basically defines the column
table. These rows are called
(Attributes) of the table.
tuple.

It is further classified
It doesn’t have any further
into Procedural and Non-
classification.
Procedural DML.

Basic command present in DDL BASIC command present in


are CREATE, DROP, RENAME, DML are UPDATE, INSERT,
ALTER etc. MERGE etc.

DDL does not use WHERE While DML uses WHERE


clause in its statement. clause in its statement.
DDL DML
DDL is used to define the DML is used to manipulate the
structure of a database. data within the database.

DDL is used to create and modify DML is used to perform


database objects like tables, operations on the data within
indexes, views, and constraints. those database objects.

DDL statements are typically DML statements are frequently


executed less frequently than executed to manipulate and
DML statements. query data.

DDL statements are typically DML statements are typically


executed by database executed by application
administrators. developers or end-users.

DDL statements are not used to DML statements are used to


manipulate data directly. manipulate data directly.

DDL statements do not change the DML statements change the


contents of the database. contents of the database.

Examples of DDL commands:


CREATE TABLE, ALTER Examples of DML commands:
TABLE, DROP TABLE, SELECT, INSERT, UPDATE,
TRUNCATE TABLE, and DELETE, and MERGE.
RENAME TABLE.

You might also like