当前位置:网站首页>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语句中有写。
边栏推荐
- libpng12.so. 0: cannot open shared object file: no such file or directory
- three.js小结
- Servlet
- 【ITSM】什么是ITSM,IT部门为什么需要ITSM
- Forkjoin and stream flow test
- MongoDB:一、MongoDB是什么?MongoDB的优缺点
- SOE spatial analysis server MySQL and PostGIS geospatial database of Postgres anti injection attack
- 【企业数据安全】升级备份策略 保障企业数据安全
- Elements of database ER diagram
- 蚂蚁新村田头村变甜头村 让厦门灌口镇田头村变甜头村的特色农产品之一是
猜你喜欢

B-tree series

Pla ne colle pas sur le lit: 6 solutions simples

SystemVerilog learning-10-validation quantification and coverage

C# ManualResetEvent 类的理解

浅谈SIEM

蚂蚁新村田头村变甜头村 让厦门灌口镇田头村变甜头村的特色农产品之一是

HCM Beginner (IV) - time
![Pit of kotlin bit operation (bytes[i] and 0xff error)](/img/2c/de0608c29d8af558f6f8dab4eb7fd8.png)
Pit of kotlin bit operation (bytes[i] and 0xff error)

Skywalking integrated Nacos dynamic configuration

讓田頭村變甜頭村的特色農產品是仙景芋還是白菜
随机推荐
3D printer threading: five simple solutions
FPGA - 7 Series FPGA internal structure clocking-01-clock Architecture Overview
Pychart configuring jupyter
Pol8901 LVDS to Mipi DSI supports rotating image processing chip
交换机配置软件具有的作用
Restframework-simplejwt rewrite authentication mechanism
DEV XPO对比之UOW
How does the port scanning tool help enterprises?
jdbc-连接池
讓田頭村變甜頭村的特色農產品是仙景芋還是白菜
Discrimination between left and right limits of derivatives and left and right derivatives
C# ManualResetEvent 类的理解
B-tree series
相同区域 多源栅格数据 各个像元行列号一致,即行数列数相同,像元大小相同
Geoffrey Hinton: my 50 years of in-depth study and Research on mental skills
端口扫描工具是什么?端口扫描工具有什么用
【ManageEngine】如何实现网络自动化运维
ArcServer密码重置(账号不可以重置)
IT服务管理(ITSM)在高等教育领域的应用
Flink实战--多流合并