数据库a(int a1,int a2 ,varchar(50) a3)与
数据库b(int b1,int b2 ,varchar(50) b3)
查询出a数据库中a1=b1的记录同时将b3更新a3所返回表.比如
------------a表----------------------------
1 11 "a"
2 22 "b"
3 33 "c"------------b表----------------------------
4 11 "aa"
2 22 "bb"
5 33 "cc"结果------------c表------------------------
2 22 "bb"
最好是SQL语句,同时修改只是在内存中进行,不可以修改两个表.
数据库b(int b1,int b2 ,varchar(50) b3)
查询出a数据库中a1=b1的记录同时将b3更新a3所返回表.比如
------------a表----------------------------
1 11 "a"
2 22 "b"
3 33 "c"------------b表----------------------------
4 11 "aa"
2 22 "bb"
5 33 "cc"结果------------c表------------------------
2 22 "bb"
最好是SQL语句,同时修改只是在内存中进行,不可以修改两个表.
from a,b
where a.a1=b.b1不知道你说的是不是这个意思
(select a.a1,b.b2 from a,b where a.a1=b.b1)
into c
同时将b3=a3
select a.* , b.* from a , b where a.a1 = b.b1--2
update c set c3 = b.b3
from c , a , b
where c.c1 = a.a1 and a.a1 = b.b1
into c --结果生成表c
from a , b
where a.a1 = b.b1update b --用a表更新b表
set b.b3=a.a3
from a
where a.a1 = b.b1
set a.a3=b.b3
from b
where a.a1=b.b1select a.*
into c
from a,b
where a.a1=b.b1
from a,b
where a.a1 = b.b1