当前位置:网站首页>Concepts and differences of DQL, DML, DDL and DCL
Concepts and differences of DQL, DML, DDL and DCL
2022-06-23 06:50:00 【Small code 2016】
SQL(Structure Query Language) Language is the core language of database .
SQL Our development is from 1974 Year begins , Its development process is as follows : 1974 year ----- from Boyce and Chamberlin Put forward , It was called SEQUEL. 1976 year -----IBM The company's Sanjase The Institute has developed RDBMS SYSTEM R Change to SQL. 1979 year -----ORACLE The company's first publication is based on SQL The commercialization of the RDBMS product . 1982 year -----IBM The company published the first RDBMS Language SQL/DS. 1985 year -----IBM The company published the first RDBMS Language DB2. 1986 year ----- The national organization for Standardization ANSI announce SQL As a database industry standard . SQL Is a standard database language , It's a set oriented descriptive nonprocedural language . It's powerful , Efficient , Easy to learn, easy to maintain ( so far , I haven't seen anything better than it The language you learn ). However SQL Language because of the above advantages , At the same time, there is such a problem : It's nonprocedural language , That is, most statements are executed independently , It's not about context , and Most applications are a complete process , Obviously with SQL It's very difficult to fully implement these functions Difficult . So most database companies are trying to solve this problem , We have done the following two aspects : (1) expand SQL, stay SQL Introduce the procedural structure into the process ;(2) hold SQL Embedded in high level language , In order to complete a complete application together .
Two . SQL The classification of languages
SQL Language can be divided into four categories : Data query language DQL, Data manipulation language DML, Data definition language DDL, Data control language DCL.
- Data query language DQL Data query language DQL The basic structure is made up of SELECT Clause ,FROM Clause ,WHERE The query block made up of clauses : SELECT < Field name table > FROM < Table or view name > WHERE < Query criteria >
2 . Data manipulation language DML Data manipulation language DML There are three main forms : 1) Insert :INSERT 2) to update :UPDATE 3) Delete :DELETE - Data definition language DDL Data definition language DDL Used to create various objects in the database ----- surface 、 View 、 Indexes 、 A synonym for 、 Clustering, etc : CREATE TABLE/VIEW/INDEX/SYN/CLUSTER | | | | | surface View Indexes A synonym for cluster
DDL The operation is implicitly submitted ! You can't rollback
4. Data control language DCL Data control language DCL To grant or reclaim access to a database , And control Time and effect of database manipulation transaction , Monitor the database . Such as : 1) GRANT: to grant authorization .
ROLLBACK [WORK] TO [SAVEPOINT]: Go back to a certain point . Roll back —ROLLBACK The rollback command returns the database state to the last committed state . The format for : SQL>ROLLBACK;
COMMIT [WORK]: Submit .
Insert in database 、 When deleting and modifying operations , Only when the transaction is committed to data It's only when it's in storage . Before the transaction is committed , Only the person who operates the database has the right to see To what is done , Others can only see... After the final submission . There are three types of submitted data : Explicitly commit 、 Implicit and automatic submission . The following points Don't say these three types .
(1) Explicitly commit use COMMIT The commit done directly by the command is an explicit commit . The format for : SQL>COMMIT;
(2) Implicitly submit use SQL The commit done indirectly by the command is an implicit commit . These orders are : ALTER,AUDIT,COMMENT,CONNECT,CREATE,DISCONNECT,DROP, EXIT,GRANT,NOAUDIT,QUIT,REVOKE,RENAME.
(3) Automatic submission If the AUTOCOMMIT Set to ON, Then insert 、 modify 、 After the delete statement is executed , The system will automatically submit , This is auto submit . The format for : SQL>SET AUTOCOMMIT ON;
边栏推荐
- Gridsearchcv (grid search), a model parameter adjuster in sklearn
- Media industry under the epidemic situation, small program ecology driven digital transformation exploration
- Problem: when the attribute in the data object (defined data) in the access component is also the attribute in the object object, an error is reported
- Haas506 2.0 development tutorial - Advanced Component Library -modem SMS (only supports versions above 2.2)
- 2121. sum of intervals of the same elements - hash table method
- idea的去除转义的复制粘贴
- 2121. 相同元素的间隔之和-哈希表法
- Chrome删除重复书签
- Laravel log channel grouping configuration
- Copy and paste of idea without escape
猜你喜欢

光谱共焦的测量原理及厚度测量模式

Easy EDA #学习笔记09# | ESP32-WROOM-32E模组ESP32-DevKitC-V4开发板 一键下载电路

中台库存中的实仓与虚仓的业务逻辑设计

20220621 Dual Quaternion

Sword finger offer 42 Maximum sum of successive subarrays

English grammar_ Adjective comparative - Level 3 change

mysql 优化

idea安装 CloudToolkit 插件

从 WAN 到 SD-WAN 边缘设备的网络架构

解读创客教育中的团结协作精神
随机推荐
云盒子联合深信服,为南京一中打造智慧双模教学资源分享平台
[graduation season · advanced technology Er] it's my choice. I have to walk on my knees
Mysql5.6 (5.7-8) is based on shardingsphere5.1.1 sharding proxy mode. Read / write separation
Programmers' real ideas | daily anecdotes
总结的好处
xml dtd 记录
Drawing and resetting of mars3d point, line and surface
MySQL ON DUPLICATE KEY 和 PgSQL ON CONFLICT(主键) 处理主键冲突
Steam教育对国内大学生的影响力
Copy and paste of idea without escape
2022年养老理财产品有哪些?风险小的
Network architecture from Wan to sd-wan edge devices
C# wpf 通过绑定实现控件动态加载
phpStudy设置301重定向
Understand how learning JSX works
Termux
Verilog语法讲解
haas506 2.0开发教程-高级组件库-modem.voiceCall(仅支持2.2以上版本)
2.17 haas506 2.0开发教程-system(仅支持2.2以上版本)
mingw-w64、msys和ffmpeg的配置与编译