当前位置:网站首页>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索引
边栏推荐
- Stm32f030f4 drives tim1637 nixie tube chip
- What is mosaic?
- Development trend and future direction of neural network Internet of things
- 上海炒股开户选择手机办理安全吗?
- Redis AOF log
- 有没有一段代码,让你为人类的智慧所折服
- The digital summit is popular, and city chain technology has triggered a new round of business transformation
- TS初次使用、ts类型
- Why is PHP called hypertext preprocessor
- 【小程序】通过scroll-view组件实现左右【滑动】列表
猜你喜欢

物联网应用技术专业是属于什么类

mysql binlog的清理

Why is PHP called hypertext preprocessor

物联网现状及未来发展趋势

2022年最佳智能家居开源系统:Alexa、Home Assistant、HomeKit生态系统介绍

flutter Unable to load asset: assets/images/888. png

Zhongang Mining: it has inherent advantages to develop the characteristic chemical industry dominated by fluorine chemical industry

Future trend and development of neural network Internet of things

边缘计算概述

Zhao Fuquan: to ensure supply in the short term, we should build a safe, efficient and resilient supply chain in the long term
随机推荐
Distance measurement - Hamming distance
云信小课堂 | IM及音视频中常见的认知误区
ARP报文头部格式和请求流程
想请教股票开户要认识谁?在线开户是安全么?
MySQL binlog cleanup
【小程序】通过scroll-view组件实现左右【滑动】列表
Microservice stability management
Redis RDB snapshot
Postgresql源码(57)HOT更新为什么性能差距那么大?
What are the common types of points mall games?
神经网络物联网的未来趋势与发展
ARP message header format and request flow
边缘计算概述
认识--Matplotlib
门级建模—课后习题
Behind sharing e-commerce: the spirit of CO creation, symbiosis, sharing, CO prosperity and win-win
Redis RDB快照
SWT / anr problem - SWT causes low memory killer (LMK)
通过Go语言创建CA与签发证书
从第三次技术革命看企业应用三大开发趋势