当前位置:网站首页>SQL中DML语句(数据操作语言)
SQL中DML语句(数据操作语言)
2022-07-01 06:17:00 【HHYZBC】
表示数据操作语言(凡是对表当中的数据进行增删改的都是DML)
目录
insert(插入数据)
语法格式:
insert into 表名(字段名1,字段名2,字段名3...) values(值1,值2,值3);
数量要对应。数据类型要对应。
字段名可以省略,省略后添加的值都要写上。
如果需要同时插入多个值时:
insert into t_user(字段名1,字段名2) values(),(),(),();
values后面中括号内,一个括号表示一个数据
update(修改数据)
语法格式:
update 表名 set 字段名1=值1,字段名2=值2,字段名3=值3... where 条件;
没有条件限制会导致所有数据全部更新。
delete (删除数据)
语法格式:
delete from 表名 where 条件;
一般与条件查询连用,表示删除满足条件的数据,如果没有条件时,则整张表的数据会全部删除!,并且delete这种方式会比较慢,如果需要考虑效率问题的话可使用truncate语句。使用方法在DDL语句中有写。
边栏推荐
- MySQL怎么存储emoji?
- B-树系列
- To sort out the anomaly detection methods, just read this article!
- Kubedm builds kubenetes cluster (Personal Learning version)
- Servlet
- 让厦门灌口镇田头村变“甜头”村的特色农产品之一是
- Factorial divisor (unique decomposition theorem)
- 68 Cesium代码datasource加载czml
- 解决麒麟V10上传文件乱码问题
- Talking from mlperf: how to lead the next wave of AI accelerator
猜你喜欢
![阿里OSS Postman Invalid according to Policy: Policy Condition failed: [“starts-with“, “$key“, “test/“]](/img/3c/7684b7c594f7871471f89007294703.png)
阿里OSS Postman Invalid according to Policy: Policy Condition failed: [“starts-with“, “$key“, “test/“]

手把手教你实现一个深度学习框架...

HCM Beginner (III) - quickly enter pa70 and pa71 to browse employee information PA10

SystemVerilog learning-10-validation quantification and coverage

FPGA - 7 Series FPGA internal structure clocking-01-clock Architecture Overview

Arcserver password reset (account cannot be reset)
![Pit of kotlin bit operation (bytes[i] and 0xff error)](/img/2c/de0608c29d8af558f6f8dab4eb7fd8.png)
Pit of kotlin bit operation (bytes[i] and 0xff error)

Picture server project test

DHT11 temperature and humidity sensor

Tidb single machine simulation deployment production environment cluster (closed pit practice, personal test is effective)
随机推荐
High order binary search tree
srpingboot security demo
make: g++:命令未找到
Save data in browser to local file
Small guide for rapid completion of mechanical arm (VI): stepping motor driver
On siem
Picture server project test
【网络安全工具】USB控制软件有什么用
Transformer le village de tiantou en un village de betteraves sucrières
【自动化运维】自动化运维平台有什么用
libpng12.so. 0: cannot open shared object file: no such file or directory
Excel visualization
lxml模块(数据提取)
golang panic recover自定义异常处理
69 Cesium代码datasource加载geojson
数据库er图组成要素
连续四年入选Gartner魔力象限,ManageEngine卓豪是如何做到的?
局域网监控软件有哪些功能
HCM Beginner (I) - Introduction
three.js小结