我想在 5 列的表 A 中插入行, 前 2 列是从另一个表 B 中选择的,其余列是给
insert into A(a,b,c,d,e)
values ((select a1,b2 from B where a1=X) ,'c2' ,d2,e2);
最佳答案
使用插入。 . .选择
语法:
insert into A(a, b, c, d, e)
select b.a1, b.b2, 'c2', d2, e2
from B b
where b.a1 = X;
关于mysql - 我无法使用选择查询插入列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54291065/