mysql 选择插入数据(包含不存在列)具体实现
时间:2024-01-21 15:15:56
mysql> select 'name',id from table_b; //'name' 不在table_b表中
+------+-----------+
| name | id |
+------+-----------+
| name | 123456 |
| name | 1234567 |
| name | 12345678 |
| name | 123456789 |
+------+-----------+
4 rows in set (0.00 sec)
mysql> insert into table_a(name,b_refer) select 'name', id from table_b; //'name' 不在table_b表中
Query OK, 4 rows affected (0.03 sec)
标签:mysql,选择,插入
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python虚拟机字节码教程之装饰器实现详解
2021-10-31 08:59:47
![](https://img.aspxhome.com/file/2023/1/100761_0s.png)
TensorFlow安装及jupyter notebook配置方法
2022-09-11 01:05:23
python中文文本切词Kmeans聚类
2023-06-01 18:35:57
优雅管理Go Project生命周期
2023-06-16 01:10:42
![](https://img.aspxhome.com/file/2023/0/87630_0s.jpg)
python实现堆排序的实例讲解
2023-01-06 20:50:38
![](https://img.aspxhome.com/file/2023/9/90519_0s.png)
如何让python程序正确高效地并发
2021-10-14 20:33:54
![](https://img.aspxhome.com/file/2023/3/110293_0s.png)
一文搞懂Python中列表List和元组Tuple的使用
2022-10-09 02:24:58
![](https://img.aspxhome.com/file/2023/8/93968_0s.png)
python解决循环依赖的问题分析
2023-03-19 12:22:14
Python+Pytorch实战之彩色图片识别
2022-09-12 13:57:39
![](https://img.aspxhome.com/file/2023/4/127834_0s.png)
Fibonacci数,Θ(log n)
2010-03-28 13:28:00
2008北京奥运会倒计时js代码
2008-01-22 18:18:00
Python 中获取数组的子数组示例详解
2022-11-04 19:26:26
详解利用Python制作中文汉字雨效果
2023-04-26 07:09:17
![](https://img.aspxhome.com/file/2023/3/102973_0s.jpg)
golang实现整型和字节数组之间的转换操作
2024-02-11 00:13:08
linux 安装 mysql 8.0.19 详细步骤及问题解决方法
2024-01-13 22:31:33
在Python中处理日期和时间的基本知识点整理汇总
2021-05-13 07:12:14
![](https://img.aspxhome.com/file/2023/9/89079_0s.jpg)
基于Python实现智能停车场车牌识别计费系统
2021-05-23 07:44:22
![](https://img.aspxhome.com/file/2023/6/67856_0s.png)
perl几个文件操作例子
2022-03-23 09:24:09
Python入门教程(四十)Python的NumPy数组创建
2023-11-14 08:36:32
![](https://img.aspxhome.com/file/2023/0/100820_0s.png)
解读Python脚本的常见参数获取和处理方式
2022-07-17 03:36:02
![](https://img.aspxhome.com/file/2023/1/118041_0s.jpg)