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

What are the categories of sql language classification

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

Share

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

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.

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

Internet Technology

Wechat

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

12
Report