将b表中caller列的值插入a表中call列中。
create table a
(
fid int,
call varchar(20),
age int
)
create table b
(
fid int,
caller varchar(20),
parentId int
)
select * from a
select * from b
insert into a values(1,null,19)
insert into a values(2,null,20)
insert into b values(1,'a',1)
insert into b values(2,'b',2)
update a set call =b.caller from b inner join a on a.fid = b.parentId