请问怎样把一个表中的一个字段分条件插入另一个表中,如下描述: update A set A1=(select B1 where B3=A.A3 and B2>0)update A set A2=(select B1 where B3=A.A3 and B2<0) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update A set A1=(select B1 from B where B3=A.A3 and B2>0)update A set A2=(select B1 from B where B3=A.A3 and B2<0) 试试这样:Insert A(A1)select B1 from B,A where B.B3=A.A3 and B.B2>0Insert A(A2) select B1 from B,A where B.B3=A.A3 and B.B2<0 支持用这个: update A set A1=(select B1 from B where B3=A.A3 and B2>0)update A set A2=(select B1 from B where B3=A.A3 and B2<0) SQL2005查询不能得到预期查询结果,求解。 各位大虾,还有没休息的吗?请教一条语句 存储过程的参数传递 根据时间取这个时间月的最未一天,如2005-10-18 取10月份的最未一天2004-10-31 bcp导入文件错误? 在企业管理器中新建sql server注册的时候出这错误提示帮忙看看 问:远程数据库的数据复制到本地数据库成为了乱码?在线等!谢谢!!! 请问几个ORACLE方面的问题(高手请进!) 如何将数据库中所有存储过程批次转化为文本 在两台服务器上的数据库间创建触发器的注意事项? 数据库中数据删除的问题,高分请教。 请问DBA大牛,这个问题如何解决?
update A set A2=(select B1 from B where B3=A.A3 and B2<0)
Insert A(A1)
select B1 from B,A where B.B3=A.A3 and B.B2>0
Insert A(A2)
select B1 from B,A where B.B3=A.A3 and B.B2<0
update A set A1=(select B1 from B where B3=A.A3 and B2>0)
update A set A2=(select B1 from B where B3=A.A3 and B2<0)