当前位置:网站首页>Let's talk about what DDL, DML, DQL and DCL are in SQL statements
Let's talk about what DDL, DML, DQL and DCL are in SQL statements
2022-08-09 23:43:00 【m0_67393828】
The core language of the database is the SQL language. What are DDL, DML, DQL, and DCL?Let's talk about these four concepts.
I. DDL Statement
DDL (Data Definition Language) statement: Data Definition Language, mainly to define/change the table structure, data type, link between tables and other operations.Commonly used statement keywords are CREATE, DROP, ALTER, etc.
The template is as follows:
CREATE TABLE table name(column name 1 data type,column name 2 data type,column name 3 data type,...)ALTER TABLE tablename;eg: ALTER TABLE table name ADD column name data type; (add a column)ALTER TABLE table name CHANGE column name new column name new data type; (modify column name)ALTER TABLE table name DROP column name;DROP TABLE table name;DROP DATABASE database name;Second, DML statement
DML (Data Manipulation Language) statement: Data Manipulation Language, mainly for adding, deleting and modifying data.Commonly used statement keywords are INSERT, UPDATE, DELETE, etc.
The main differences between DDL statements and DML statements:
DDL
DML
Name
Data Definition Language
Data manipulation language
Difference
Create, delete, modify objects in database
Only operate on the data within the table (does not involve the definition of the table, the modification of the structure, or other objects)
The template is as follows:
INSERT INTO table name (field1,field2,...) values (some value,some value,...),(some value,some value,...);UPDATE tablename SET columnname=new value WHERE qualification;DELETE FROM table name WHERE qualification;Third, DQL statement
DQL (Data Query Language) statement: Data Query Language, mainly for querying data.Common keywords are SELECT, FROM, WHERE, etc.
The template is as follows:
SELECT column name FROM table name WHERE qualification;Fourth, DCL statement
DCL (Data Control Language) statement: Data Control Language, mainly used to set/change database user permissions.Common keywords are GRANT, REVOKE, etc.
DCL statements are rarely used by ordinary people.
The template is as follows:
GRANT (Grant)REVOKE (revoke permission)If the article is helpful to you, please click Like, leave a comment to support it?? If you have any questions, you can leave a private message??.If you can give a three-line (Like, Favorite, Follow), it would be best??.
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- CVPR22 Oral | shunt through multi-scale token polymerization from attention, code is open source
- MLOps的演进历程
- SecureCRT背景配色
- kvm虚拟机出现启动不了,NOT available,PV大于分区
- String hashing (2014 SERC J question)
- mysql multi-table left link query
- 一本通2074:【21CSPJ普及组】分糖果(candy)
- laravel 表迁移报错[通俗易懂]
- PHP 2D array sorted by a field
- 宝塔实测-搭建LightPicture开源图床系统
猜你喜欢
![[Generic Programming] Full Detailed Explanation of Templates](/img/9d/7864f999cb2e4edda2ee7723558135.png)
[Generic Programming] Full Detailed Explanation of Templates
![[Implementation of the interface for adding, deleting, checking, and modifying a double-linked list]](/img/49/ebedcd4d27aa608360ac17e504f36d.png)
[Implementation of the interface for adding, deleting, checking, and modifying a double-linked list]

台风生成,广州公交站场积极开展台风防御安全隐患排查

一本通2074:【21CSPJ普及组】分糖果(candy)

JS解混淆-AST还原案例

Flask之路由(app.route)详解

4D Summary: 38 Knowledge Points of Distributed Systems

【双链表增删查改接口的实现】

Sudoku | Backtrack-7

从产品角度看 L2 应用:为什么说这是一个游乐场?
随机推荐
编程语言中,取余和取模的区别
APP自动化测试框架-UiAutomator2基础入门
mysql配置参数详解[通俗易懂]
PHP 二维数组根据某个字段排序
CVPR22 Oral|通过多尺度token聚合分流自注意力,代码已开源
必看设计干货|易知微设计师是怎么做标准可视化设计服务的?
Leetcode 93 IP addresses
MLOps的演进历程
论文解读(DropEdge)《DropEdge: Towards Deep Graph Convolutional Networks on Node Classification》
金山云地震,震源在字节?
Simple questions peek into mathematics
ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes
Jensen (琴生) 不等式
从产品角度看 L2 应用:为什么说这是一个游乐场?
MySQL跨表、多表更新SQL语句总结
Shanghai Konan SmartRocket series product introduction (3): SmartRocket iVerifier computer interlocking system verification tool
【微服务~Nacos】Nacos服务提供者和服务消费者
在“企业通讯录”的盲区,融云的边界与分寸
Hessian Matrix 海森矩阵
上海控安SmartRocket系列产品推介(三):SmartRocket iVerifier计算机联锁系统验证工具