📜  DBMS中DDL和DML的区别

📅  最后修改于: 2021-09-15 01:32:39             🧑  作者: Mango

先决条件 – DDL、DQL、DML、DCL 和 TCL 命令

DDL:
DDL 是数据定义语言,用于定义数据结构。例如:create table、alter table 是 SQL 中的指令。

DML:
DML 是数据操作语言,用于操作数据本身。例如:插入、更新、删除是 SQL 中的指令。

DDL和DML的区别:

DDL DML
It stands for Data Definition Language. It stands for Data Manipulation Language.
It is used to create database schema and can be used to define some constraints as well. It is used to add, retrieve or update the data.
It basically defines the column (Attributes) of the table. It add or update the row of the table. These rows are called as tuple.
It doesn’t have any further classification. It is further classified into Procedural and Non-Procedural DML.
Basic command present in DDL are CREATE, DROP, RENAME, ALTER etc. BASIC command present in DML are UPDATE, INSERT, MERGE etc.
DDL does not use WHERE clause in its statement. While DML uses WHERE clause in its statement.