Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Comparative Analysis of DML and DDL

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The editor will share with you the comparative analysis of DML and DDL. I hope you will gain a lot after reading this article. Let's discuss it together.

DDL: database definition language, used to create databases, create tables, etc.

DML: database management language, such as add, delete, change and query statements, etc.

DCL: database operation language, such as modifying database system permissions.

DQL: data query language, such as fuzzy query, join query.

Here is a comparison of DML,DDL.

DML languages, such as update,delete,insert, etc., require commit to modify data in tables.

DDL languages, such as create,drop, which change the table structure, do not need to write commit (because commit is hidden inside)

DDL data definition language:

Create table create table

Alter table modify table

Drop table delete table

Truncate table deletes all rows in the table

Create index creates an index

Drop index delete index

When a DDL statement is executed, oracle commits the current transaction before and after each statement. If the user uses the insert command to insert the record into the database and executes a DDL statement (such as create table), the data from the insert command is submitted to the database. When the DDL statement execution is complete, the DDL statement is automatically committed and cannot be rolled back.

DML data manipulation language:

Insert inserts records into the database

Update modifies database records

Delete deletes records from the database

When executing the DML command, if it is not submitted, it will not be seen by other sessions. Unless the DDL command or DCL command is executed after the DML command, or the user exits the session, or terminates the instance, the system automatically

Issue the commit command to commit the uncommitted DML command.

After reading this article, I believe you have a certain understanding of the comparative analysis of DML and DDL, want to know more about it, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report