标签:var value create HERE 多表关联 varchar exist date oracl
create table t1(
id number(10),
name varchar2(10)
);
create table t2(
id number(10),
name varchar2(10)
);
insert into t1 values(1,‘06‘);
insert into t1 values(2,‘02‘);
insert into t2 values(3,‘03‘);
insert into t2 values(1,‘01‘);
select * from t1;
select * from t2;
update t1
set t1.name = (select t2.name from t2 where t2.id=t1.id)
where exists (select * from t2 where t2.id=t1.id) ;
标签:var value create HERE 多表关联 varchar exist date oracl
原文地址:https://www.cnblogs.com/szl6/p/9509537.html