A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 王宗伟 中级黑马   /  2012-4-9 10:52  /  1947 人查看  /  2 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

本帖最后由 王宗伟 于 2012-4-10 23:05 编辑

rt{:soso_e117:}

评分

参与人数 1技术分 +1 收起 理由
宋天琪 + 1

查看全部评分

2 个回复

倒序浏览
update customers a
   set    city_name=(select b.city_name from tmp_cust_city b where b.customer_id=a.customer_id)
   where exists (select 1
                  from   tmp_cust_city b
                  where b.customer_id=a.customer_id
                 )
   -- update 超过2个值
   update customers a
   set    (city_name,customer_type)=(select b.city_name,b.customer_type
                                     from   tmp_cust_city b
                                     where b.customer_id=a.customer_id)
   where exists (select 1
                  from   tmp_cust_city b
                  where b.customer_id=a.customer_id
                 )

评分

参与人数 1技术分 +1 收起 理由
宋天琪 + 1

查看全部评分

回复 使用道具 举报
让网络上纷纷冒出该帖的真人版卡通版搞笑版成人版的好帖  
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马