我想将表 1 的值插入表 2,其中表 2 中的列存在于表 1 中。有关更多参考,请参阅此表:
表格1
+----------+----------+----------+
| col_1 | col_2 | col_3 |
+----------+----------+----------+
| col_val | col_val | col_val |
| col_val | col_val | col_val |
| col_val | col_val | col_val |
| col_val | col_val | col_val |
+----------+----------+----------+
表 2
+----------+----------+----------+----------+----------+
| col_1 | col_2 | col_3 | col_4 | col_5 |
+----------+----------+----------+----------+----------+
| col_val | col_val | col_val | | |
| col_val | col_val | col_val | | |
| col_val | col_val | col_val | | |
| col_val | col_val | col_val | | |
+----------+----------+----------+----------+----------+
如果表 2 中的列在表 1 中不存在,则插入空值。
提前致谢!