Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

What are DDL and DML?

I have heard the terms DDL and DML regarding datasets, yet I'm not sure what they are.

What are they and how would they identify with SQL?
by

3 Answers

akshay1995
DDL is Data Definition Language : it is used to define data structures.

For example, with SQL, it would be instructions such as create table, alter table, ...


DML is Data Manipulation Language : it is used to manipulate data itself.

For example, with SQL, it would be instructions such as insert, update, delete, ...
sandhya6gczb
DDL is Data Definition Language : Specification notation for defining the database schema. It works on Schema level.

DDL commands are:

create,drop,alter,rename

For example:

create table account (
account_number char(10),
balance integer);

DML is Data Manipulation Language .It is used for accessing and manipulating the data.

DML commands are:

select,insert,delete,update,call

For example :

update account set balance = 1000 where account_number = 01;
pankajshivnani123
In layman terms suppose you want to build a house, what do you do.

DDL i.e Data Definition Language

Build from scratch
Renovate it
Destroy the older one and recreate it from scratch
that is

CREATE
ALTER
DROP & CREATE
DML i.e. Data Manipulation Language

People come/go inside/from your house

SELECT
DELETE
UPDATE
TRUNCATE
DCL i.e. Data Control Language

You want to control the people what part of the house they are allowed to access and kind of access.

GRANT PERMISSION

Login / Signup to Answer the Question.