当前位置:网站首页>Basic operations of MySQL data table, addition, deletion and modification & DML
Basic operations of MySQL data table, addition, deletion and modification & DML
2022-07-05 12:12:00 【ziyi813】
MySql Basic operation -DML
DML explain
DML It refers to the data operation language , The full English name is (Data Manipulation Language), Used to add data records of tables in the database 、 Delete 、 modify .
keyword :
- insert Insert
- update to update
- delete Delete
Insert data into insert
Grammar format :
insert into surface ( Column 1, Column 2, Column 3, …) values ( value 1, value 2, value 3, …); // Insert values... Into the table , Must match type
insert into surface values ( value 1, value 2, value 3, …); // Insert values for all columns
Example :
insert into student (sid, name, gender, age, birth, address) values (1, ‘oscar’, ‘man’, 18, ‘2010-12-12’, ‘ Longgang District, Shenzhen ’);
Data update update
Grammar format :
update Table name set Field name = value , Field name = value
Example :
# There are no conditions , Then all addresses of the whole table will be changed to Shenzhen
update student set address = ' Shenzhen '
# With query criteria , Only specified conditions take effect
update student set address = ' Shenzhen ' where id = 1
# You can update the values of multiple fields at the same time , Separated by commas
update student set address = ' Shenzhen ', name = 'litchi' where id = 1
Data deletion delete
Grammar format
delete form Table name [where Conditions ]
truncate table Table name perhaps truncate Table name
Example :
-- Delete sid by 1 The data of
delete form student where sid = 1
-- Delete all data from the table
delete from student;
-- Empty data
truncate table student;
truncate student;
delete Is to delete all data in the table , and truncate Is equivalent to deleting the table and then rebuilding the table data structure , More thorough .
summary
DML Data manipulation language , Mainly aimed at MySql Add, delete and change
Three basic operations :
insert
delete
update
边栏推荐
- 多表操作-自关联查询
- The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
- Halcon template matching actual code (I)
- Uniapp + unicloud + Unipay realize wechat applet payment function
- 跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
- 【L1、L2、smooth L1三类损失函数】
- 【云原生 | Kubernetes篇】Ingress案例实战(十三)
- Multi table operation - Auto Association query
- pytorch-权重衰退(weight decay)和丢弃法(dropout)
- [mainstream nivida graphics card deep learning / reinforcement learning /ai computing power summary]
猜你喜欢

splunk配置163邮箱告警

Network five whip

Pytorch MLP
![[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]](/img/ad/b96e9319212cf2724e0a640109665d.png)
[pytorch modifies the pre training model: there is little difference between the measured loading pre training model and the random initialization of the model]

Mongodb replica set

pytorch-多层感知机MLP
A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases

How to clear floating?

【 YOLOv3中Loss部分计算】
随机推荐
全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
Multi table operation - sub query
只是巧合?苹果 iOS16 的神秘技术竟然与中国企业 5 年前产品一致!
Video networkState 属性
7月华清学习-1
[calculation of loss in yolov3]
【yolov3损失函数】
Semantic segmentation experiment: UNET network /msrc2 dataset
MySQL splits strings for conditional queries
Open3d mesh (surface) coloring
Course design of compilation principle --- formula calculator (a simple calculator with interface developed based on QT)
【L1、L2、smooth L1三类损失函数】
Use and install RkNN toolkit Lite2 on itop-3568 development board NPU
1. Laravel creation project of PHP
Liunx prohibit Ping explain the different usage of traceroute
1 plug-in to handle advertisements in web pages
Matlab imoverlay function (burn binary mask into two-dimensional image)
跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
Swift - add navigation bar
Open3d European clustering