In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the type of database operation, with a certain reference value, friends need to refer to the next. I hope you all have a lot to gain after reading this article. Let's take a look at it together.
SQL language is 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 a query block consisting of SELECT clause, FROM clause and WHERE clause:
SELECT
FROM
WHERE
Data Manipulation Language (DML)
There are three main forms of data manipulation language:
1)Insert: INSERT
2)Update: UPDATE
3)Delete: Delete
Data Definition Language DDL
DDL is used to create various objects in a database-tables, views, indexes, synonyms, clusters, etc. such as:
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 databases, control the time and effect of database manipulation transactions, and monitor databases. 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 database insert, delete, and modify operations, the transaction is complete only when committed to the database. Before a transaction commits, only the person who operates the database has the right to see what has been done, and others can only see it after the final commit is complete.
There are three types of submission data: explicit submission, implicit submission, and automatic submission.
These three types are described below.
(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, the system will automatically commit after the insertion, modification and deletion statements are executed. This is automatic commit.
SQL>SET AUTOCOMMIT ON
Thank you for reading this article carefully, hope Xiaobian share database operation type is what content is helpful to everyone, but also hope that everyone more support, pay attention to the industry information channel, encounter problems to find, detailed solutions waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.