把A表的某欄位值賦B表中的某欄位
CREATE TABLE zhtt_a
(
a VARCHAR2(10),b VARCHAR2(10)
);
CREATE TABLE zhtt_b
(
a VARCHAR2(10),b VARCHAR2(10)
);
insert into zhtt_a values('1','1');
insert into zhtt_a values('12','12');
insert into zhtt_a values('13','13');
insert into zhtt_b values('1','a');
insert into zhtt_b values('12','a');
insert into zhtt_b values('13','a');
select * from zhtt_a;
select * from zhtt_b;
update zhtt_b b set b=(
select b from zhtt_a a where a.a=b.a
)