可以用这样的方式
insert into exp select a,1,2,3 from exp2
如果直接select常量,则选出来的就是常量
但是不能这样用
insert into exp values((select a from exp2),1,2,3)
会报错说是不能确定select出来的是不是唯一的
试一下就知道。
create table exp
(a int,
b int,
c int,
d int)
create table exp2
(a int)
insert into exp2 select 1
insert into exp2 select 4
insert into exp select a ,1,3,4 from exp2
select * from exp