Difference Between DML and DDL in MySQL
27
May
2013

DDL

Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:

CREATE – to create table in the database
ALTER – alters the table of the database
DROP – delete table from the database
TRUNCATE – remove all records from a table, including all spaces allocated for the records are removed

DML

Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:

SELECT – retrieve data from the a database
INSERT – insert data into a table
UPDATE – updates existing data within a table
DELETE – deletes all records from a table, the space for the records remain

  • 780 View
  • Pin It