从多个表中插入

时间:2014-05-19 04:18:24

标签: mysql insert

我想将表1中的两列插入新表,将字符串值插入新表中的第3列。我将在数千个表中执行此操作,并且似乎无法找到有关如何编写sql语句的答案。

类似的东西:

INSERT INTO newtable(a, b, c)
select (a, b)
FROM table 1
AND VALUES("c-string")

1 个答案:

答案 0 :(得分:2)

insert into table_2(a,b,c) select a,b,'your_string' from table_3;
相关问题