我想将表 1 中的两列插入到新表中,并将字符串值插入到新表的第三列中。我将在数千个表中执行此操作,但似乎无法找到如何编写 sql 语句的答案。
类似于:
INSERT INTO newtable(a, b, c)
select (a, b)
FROM table 1
AND VALUES("c-string")
最佳答案
insert into table_2(a,b,c) select a,b,'your_string' from table_3;
关于mysql - 从多个表插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23739181/