34,590
社区成员
发帖
与我相关
我的任务
分享
declare @byrecord float;
declare @ID varchar;
set @ID = '000100010001';
set @byrecord = 1.23 ;
insert into buyInfomation(用户编号,用户姓名,购买金额)
select 用户编号,A.用户姓名,@byrecord
from ICCard A
where 用户编号 = @ID
insert into 表2(id,name,buyrecord)
select id,A.name,@byrecord
from 表1 A
where id = @id