当前位置:网站首页>mysql:insert ignore、insert和replace区别
mysql:insert ignore、insert和replace区别
2022-07-01 23:23:00 【raoxiaoya】
指令 | 已存在 | 不存在 | 举例 |
---|---|---|---|
insert | 报错 | 插入 | insert into names(name, age) values(“小明”, 23); |
insert ignore | 忽略 | 插入 | insert ignore into names(name, age) values(“小明”, 24); |
replace | 替换 | 插入 | replace into names(name, age) values(“小明”, 25); |
表要求:有PrimaryKey,或者unique索引
边栏推荐
- Reproduction process and problems of analog transformer (ICLR 2022 Spotlight)
- 2022年起重机司机(限桥式起重机)考试试题及模拟考试
- 2021 RoboCom 世界机器人开发者大赛-本科组初赛
- Material Design组件 - 使用BottomSheet展现扩展内容(一)
- 学成在线案例实战
- Notes on problems - /usr/bin/perl is needed by mysql-server-5.1.73-1 glibc23.x86_ sixty-four
- [micro service sentinel] @sentinelresource details
- notBlank 和 notEmpty
- ARP message header format and request flow
- 股票开户哪个证券公司最好,有安全保障吗
猜你喜欢
What is the relationship between modeling and later film and television?
2022年R1快开门式压力容器操作考题及答案
有没有一段代码,让你为人类的智慧所折服
from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
ARP报文头部格式和请求流程
Redis RDB snapshot
Material Design组件 - 使用BottomSheet展现扩展内容(一)
物联网技术应用属于什么专业分类
Matplotlib常用图表
使用uni-simple-router,动态传参 TypeError: Cannot convert undefined or null to object
随机推荐
Redis master-slave synchronization
TS初次使用、ts类型
小程序表单校验封装
SWT/ANR问题--SWT 导致 kernel fuse deadlock
Stm32f030f4 drives tim1637 nixie tube chip
有没有一段代码,让你为人类的智慧所折服
Current situation and future development trend of Internet of things
STM32F030F4驱动TIM1637数码管芯片
Postgresql源码(58)元组拼接heap_form_tuple剖析
[micro service sentinel] @sentinelresource details
Development trend and future direction of neural network Internet of things
Matplotlib common charts
MySQL binlog cleanup
plain framework的实际应用和扩展
[swoole Series 1] what will you learn in the world of swoole?
Matplotlib常用图表
Depth first search and breadth first search of graph traversal
2022年最佳智能家居开源系统:Alexa、Home Assistant、HomeKit生态系统介绍
ARP报文头部格式和请求流程
共享电商的背后: 共创、共生、共享、共富,共赢的共富精神