摘要: 描述:有两个表A 和B ,均有key 和value 两个字段,如果B 的key 在A 中也有,就把B 的value 换为A 中对应的value表B此处为tbaley的情况: A: tablex update tabley y set y.value=(select x.value from ... 阅读全文
posted @ 2014-09-29 15:07 hansongjiang8 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 如何做呢,跟上文区别不大。我建个表,输入以下1 select year,2 (select amount from info2 as t2 where t2.year=t.year and t2.mouth=1) as m1,3 (select amount from info2 as t3 whe... 阅读全文
posted @ 2014-09-29 11:02 hansongjiang8 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1.表示info 信息,字段为Id和res,如何得到如下结果 阅读全文
posted @ 2014-09-29 10:30 hansongjiang8 阅读(96) 评论(0) 推荐(0) 编辑