What is the difference between Data Definition Language (DDL) and Data Manipulation Language
(DML)?
What is the difference between Data Definition Language (DDL) and Data Manipulation Language
(DML)?
Data Definition Language (DDL) and Data Manipulation Language (DML) are both subsets of SQL (Structured Query Language), which is used to manage and interact with databases. However, they serve different purposes and operate on different aspects of the database.
DDL is used to define and modify the structure of database schemas. This includes creating, altering, and deleting database objects such as tables, indexes, and views. DDL commands do not manipulate data within the tables themselves but rather define how the database should be structured. Some of the common DDL commands include:
DDL commands are auto-committed, meaning that once they are executed, the changes are saved permanently to the database, and they cannot be rolled back[2][3][4][5][6][7].
DML, on the other hand, is used for managing data within the database. This includes inserting, updating, deleting, and retrieving data from database tables. DML commands directly affect the data itself and not the structure of the database. Common DML commands include:
junior
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào