oracle的SQL问题:2张表,表A,字段为tid,name;表B,字段为tid,value;注意2张表都是tid, 求几个sql语句:

2025-05-20 09:49:15
推荐回答(4个)
回答1:

Insert into B_t_table (select a.tid, 0 from A_t_table a,B_t_table b where a.tid=b.tid(+) and b.value is null)

回答2:

update B set B.value=(select A.name from A where A.tid=B.tid) where B.value is null;

回答3:

update B b set b.value=(select a.name from A a where a.tid=b.id);

回答4:

qq