Update 语句 现在有两张表A,B,各有两个字段 bbh,bbhmc1.A中的bbh不是主键2.B中的bbh是主键现在表A在那个bbhmc与B表中的字段不一致,想Update改为相同,求语句?谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update A set bbhmc=B.bbhmcfrom A,Bwhere A.bbh=B.bbh update a set bbhmc = b.bbhmcfrom bwhere a.bbh=b.bbh select id identity(int),* into #t from aupdate a set bbhmc=b.bbhmc from #t a,b where a.id=b.bhh update A set bbhmc=B.bbhmcfrom A,Bwhere A.bbh=B.bbh select id=identity(int),* into #t1 from aselect id=identity(int),* into #t2 from bupdate a set bbhmc=b.bbhmc from #t1 a,# t2b where a.id=b.id update aset bbhmc=b.bbhmcfrom a,bwhere a.bbh=b.bbh UPDATE A SET BBHMC=B.BBHMC FROM B WHERE A.BBH=B.BBH select id=identity(int),* into #t1 from aselect id=identity(int),* into #t2 from bupdate a set bbhmc=b.bbhmc from #t1 a,# t2 b where a.id=b.id update a set bbhmc=b.bbhmcfrom a,bwhere a.bbh=b.bbh MS-SQL 和ALTIBASE的参数比较 问两个关于SQL SERVER2000的问题 请高手来帮我优化一下这四个SQL语句,怎么样才能执行的更快一点 数据库恢复出错? 考勤刷卡中的数据取舍问题,请帮忙! 我想问一下 54 万条记录的表会不会太大? 紧急求助!!小妹 如何在使用多个go命令的.sql文档中设置一个全局变量 新手问简单的触发器问题,请高手指点,谢谢。 关于字段权限的问题 谁能将这几个数据库文件里边的内容导出??? [专家级问题]请求解答
from A,B
where A.bbh=B.bbh
set bbhmc = b.bbhmc
from b
where a.bbh=b.bbh
update a set bbhmc=b.bbhmc from #t a,b where a.id=b.bhh
set bbhmc=B.bbhmc
from A,B
where A.bbh=B.bbh
select id=identity(int),* into #t2 from b
update a set bbhmc=b.bbhmc from #t1 a,# t2b where a.id=b.id
update a
set bbhmc=b.bbhmc
from a,b
where a.bbh=b.bbh
select id=identity(int),* into #t2 from b
update a set bbhmc=b.bbhmc from #t1 a,# t2 b where a.id=b.id
a
set
bbhmc=b.bbhmc
from
a,b
where
a.bbh=b.bbh