22,210
社区成员
发帖
与我相关
我的任务
分享
select c into c form table1
select d into d form table2
insert into @Temptable (aa,bb,cc,dd)
values
(
@aa
@bb
c
d
)
DECARLE @C VARCHAR(10)
DECARLE @D VARCHAR(10)
select @C=c FROM table1
select @D=d FROM table2
insert Into @Temptable (aa,bb,cc,dd)
(
@aa,
@bb,
@C,
@D
)
要保证他们的数据一样多!!
???这样试试insert Into @Temptable (aa,bb,cc,dd)
(
@aa,
@bb ,
select c form table1 ,
select d form table2
)
insert @Temptable (aa,bb,cc,dd)
values
(
@aa,
@bb ,
select c form table1 ,
select d form table2
)