当前位置:网站首页>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索引
边栏推荐
- 每日三题 6.30
- Redis 主从同步
- 【.Net Core】程序相关各种全局文件
- Leetcode (34) -- find the first and last positions of elements in a sorted array
- from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
- PostgreSQL source code (58) tuple splicing heap_ form_ Tuple analysis
- The digital summit is popular, and city chain technology has triggered a new round of business transformation
- Linux基础 —— CentOS7 离线安装 MySQL
- Matplotlib common charts
- Postgresql源码(58)元组拼接heap_form_tuple剖析
猜你喜欢

2022 safety officer-c certificate examination question simulation examination question bank and simulation examination

2021 RoboCom 世界机器人开发者大赛-高职组初赛

Know --matplotlib

2022年起重机司机(限桥式起重机)考试试题及模拟考试

MySQL binlog cleanup

Commemorate becoming the first dayus200 tripartite demo contributor

Yunxin small class | common cognitive misunderstandings in IM and audio and video

Paramètres communs de matplotlib

Matplotlib常用图表

Linux foundation - centos7 offline installation of MySQL
随机推荐
【.Net Core】程序相关各种全局文件
纪念成为首个DAYUs200三方demo贡献者
CADD course learning (3) -- target drug interaction
Concepts of dictionary, hash table and array
[leetcode] length of the last word [58]
Notblank and notempty
【小程序】通过scroll-view组件实现左右【滑动】列表
PostgreSQL notes (10) dynamically execute syntax parsing process
PostgreSQL source code (58) tuple splicing heap_ form_ Tuple analysis
Oracle中已定义者身份执行函数AUTHID DEFINER与Postgresql行为的异同
力扣今日题-241. 为运算表达式设计优先级
Matplotlib常用图表
[swoole Series 1] what will you learn in the world of swoole?
上海炒股开户选择手机办理安全吗?
from pip._ internal. cli. main import main ModuleNotFoundError: No module named ‘pip‘
Glass mosaic
Notes to problems - file /usr/share/mysql/charsets/readme from install of mysql-server-5.1.73-1 glibc23.x86_ 64 c
What is the mosaic tailgate?
硅谷产品实战学习感触
2022安全员-C证考试题模拟考试题库及模拟考试