当前位置:网站首页>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
边栏推荐
- 数独 | 回溯-7
- L3-2 至多删三个字符 (30 分)
- Use convert_to_tensor in Tensorflow to specify the type of data
- 题解:Edu Codeforces 109(div2)
- Technology Sharing | How to use the JSON Schema mode of interface automation testing?
- L3-2 Delete up to three characters (30 points)
- POWER SOURCE ETA ETA Power Repair FHG24SX-U Overview
- laravel 表迁移报错[通俗易懂]
- Leetcode 93 复原IP地址
- 6个规则去净化你的代码
猜你喜欢

筑牢安全防线 鹤壁经济技术开发区开展安全生产培训

AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis

Pagoda measurement - building LightPicture open source map bed system

在VMware上安装win虚拟机
Quotefancy ,提供鼓舞人心语录的壁纸网站 - 倾城之链

孙正义亏掉1500亿:当初投贵了

同步锁synchronized追本溯源

五星控股汪建国:以“植物精神”深耕赛道,用“动物精神”推动成长

在“企业通讯录”的盲区,融云的边界与分寸

Flask之路由(app.route)详解
随机推荐
AI+医疗:使用神经网络进行医学影像识别分析
小黑leetcode清爽雨天之旅,刚吃完宇飞牛肉面、麻辣烫和啤酒:112. 路径总和
好未来,想成为第二个新东方
UML类图五种关系的代码实现[通俗易懂]
AI识万物:从0搭建和部署手语识别系统
mysql多表左链接查询
Tensorflow中使用convert_to_tensor去指定数据的类型
The overall construction process of the Tensorflow model
筑牢安全防线 鹤壁经济技术开发区开展安全生产培训
APP自动化测试框架-UiAutomator2基础入门
简单问题窥见数学
五星控股汪建国:以“植物精神”深耕赛道,用“动物精神”推动成长
[Generic Programming] Full Detailed Explanation of Templates
【测试】语句覆盖,判定覆盖,条件覆盖,路径覆盖
Several ways to draw timeline diagrams
linux定时执行sql文件[通俗易懂]
【微服务~Nacos】Nacos之配置中心
台风生成,广州公交站场积极开展台风防御安全隐患排查
5个 Istio 访问外部服务流量控制最常用的例子,你知道几个?
从产品角度看 L2 应用:为什么说这是一个游乐场?