MySQL language classification and data submission type

Source: Internet
Author: User
Tags create index

    • Language classification

1>, DDL (Data Definition Language)

A data definition language that defines and manages all objects in a database. Example: Create, Alter, Drop.

2>, DML (Data munipulation Language)

A data manipulation language used to process data. For example: Insert, Delete, Update, Select.

3>, DCL (Data Control Language)

Data Control language, which is used for privileged control, controlling the time and effect of database transaction, monitoring database and so on. For example: Grant, Commit, Rollback.

    • Data submission Type

1>, Explicit commit

Commit with Commit.

2>, implicit submission

When using SQL command time to submit, such as: Alter FUNCTION, ALTER PROCEDURE, Alter TABLE, BEGIN, CreateDatabase, create FUNCTION, create INDEX, create PROCEDURE, CreateTable, drop DATABASE, drop FUNCTION, drop INDEX, drop Procedure,drop table, LOAD MASTER DATA, LOCK table S, RENAME table, Setautocommit=1, START TRANSACTION, TRUNCATE table, UNLOCK TABLES.

3>, Auto-submit

After performing set autocommit on, the system commits automatically after the insert, DELETE, and update are executed.

    • Instructions for use

1>, all DML statements are explicitly committed, meaning that a commit is executed after the DML statement is executed;

2>, while others, such as DDL statements, are implicitly committed. In other words, after running those non-DML statements, the database has been implicitly committed, such as CreateTable, after running the script, the table has been built, and do not need you to explicitly commit;

3>, the transaction can be rolled back with rollback before committing the transaction (commit).

MySQL language classification and data submission type

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.