两表的查询和插入 将A表的a字段值=1的b字段的和插入到B表中c字段=2的d字段中。这个SQL语句怎么写。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select 表1.a1,表1.b1,表2.*,表1.a1+表1.b1 as d2 from 表1,表2 where 表1.a1=1 and 表2.c2=3;表结构表1:a1,b1,c11 1 12 2 23 3 3表2:a2,b2,c22 2 23 3 3 4 4 4结果:a1,b1,a2,b2,c2,d21 1 2 2 2 2 declare @sum intset @sum=select sum(b) from A where a=1update b set d=@sum where c=2 数据录入不支持阿拉伯语言怎么办? VFP 取值问题 散分!Delphi区各位大家新年快乐! 。 (初级)mdi窗体的问题? Delphi+SQL 请hazehua29接分!! 关于Com+组建安装问题 小问题!谢谢 如何解决连接网络硬盘可靠性的问题?(100分敬上) 请帮帮:TClientDataSet.CommandText的update语句问题 动态按钮组怎么打开不同的Form delphi中如何提高模糊速度?
表1:
a1,b1,c1
1 1 1
2 2 2
3 3 3
表2:
a2,b2,c2
2 2 2
3 3 3
4 4 4
结果:
a1,b1,a2,b2,c2,d2
1 1 2 2 2 2