Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the categories of sql language classification

Shulou Source: shulou.com Published: 2022-06-02 02:14:58 09月26日 Update

SQL language classification which types, for this problem, this article details the corresponding analysis and solutions, hoping to help more want to solve this problem of small partners to find a simpler and easier way.

SQL languages are divided into four categories:

Data Query Language DQL,

Data Manipulation Language DML,

Data Definition Language DDL,

Data Control Language DCL.

1. Data Query Language DQL

The basic structure of DQL is composed of SELECT clause, FROM clause, WHERE clause.

clause:

SELECT

FROM

WHERE

2 . data manipulation language DML

There are three main forms of data manipulation language:

1)Insert: INSERT

2)Update: UPDATE

3)Delete: Delete

3. Data Definition Language DDL

Data Definition Language DDL is used to create various objects in a database---tables, views,

index, synonym, cluster, etc eg:

CREATE TABLE/VIEW/INDEX/SYN/CLUSTER

table view index synonym cluster

DDL operations are implicitly committed! No rollback.

4. Data Control Language DCL

Data Control Language (DCL) is used to grant or withdraw certain privileges to access a database and to control

The database manipulates the time and effect of transactions, monitors the database, etc. For example:

1)GRANT: Authorization.

2)ROLLBACK [WORK] TO [SAVEPOINT]: Back to a certain point.

Rollback---ROLLBACK

The rollback command returns the database state to the last commit state. The format is:

SQL>ROLLBACK;

3)COMMIT [WORK]: Submit.

During insert, delete, and modify operations in the database, only when transactions are committed to the data

The library is complete. Only the person who operates the database has access to the transaction before it is committed

What you do, others can only see after the final submission is completed.

There are three types of submission data: explicit submission, implicit submission, and automatic submission. Below.

Don't mention these three types.

(1)explicitly commit

Commits that are done directly with the COMMIT command are explicit commits. The format is:

SQL>COMMIT;

(2)implicit commit

Commitments done indirectly with SQL commands are implicit commits. These orders are:

ALTER,AUDIT,COMMENT,CONNECT,CREATE,DISCONNECT,DROP,

EXIT,GRANT,NOAUDIT,QUIT,REVOKE,RENAME。

(3)autocommit

If AUTOCOMMIT is set to ON, after insert, modify, delete statements are executed,

The system will automatically submit, this is automatic submission. The format is:

SQL>SET AUTOCOMMIT ON;

About sql language classification which types of questions are shared here, I hope the above content can be of some help to everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.

Tags: Data language database command control query transaction only clause data query format problem classification synonym more state type index view synonym Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft OPPO Reno Docker Linux