Home > Database > Mysql Tutorial > body text

Does create require commit?

(*-*)浩
Release: 2019-05-20 16:58:31
Original
4213 people have browsed it

To know whether create requires commit, you need to understand these basic database sql language knowledge.

Does create require commit?

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

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

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

DQL: Data query language, such as fuzzy query and connection query.

Here is a comparison between DML and DDL.

DML language, such as update, delete, insert, etc. that modify the data in the table require commit;
DDL language, such as create, drop, etc. that change the table structure, do not need to write commit (because Commit is hidden internally);

DDL data definition language:
create table create table
alter table modify table
drop table delete table
truncate table Delete all rows in the table
create index Create index
drop index Delete index
When executing a DDL statement, Oracle will submit the current transaction before and after each statement. If the user uses the insert command to insert records into the database and then executes a DDL statement (such as create table), the data from the insert command will be submitted to the database. When the execution of the DDL statement is completed, the DDL statement will be automatically submitted and cannot be rolled back.

DML data operation language:
insert insert records into the database
update modify the records of the database
delete delete the records of the database Record
If it is not submitted when executing a DML command, it will not be seen by other sessions. Unless a DDL command or DCL command is executed after the DML command, or the user exits the session, or terminates the instance, the system will automatically
issue a commit command to submit the unsubmitted DML command.

The above is the detailed content of Does create require commit?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!