天使半只翼

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
update Countrys set (
    Abbreviation_cn,
    Abbreviation_en,
    Two_code,Three_code,
    Number_code)= 
    (select  [cn_name],
            [en_name],
            [two_code],
            [free_code],
            convert(int,number_code) as [number_code]
     from  Country.dbo.worlds a where a.cn_name=Countrys.Abbreviation_cn)

 

    
UPDATE Countrys   SET  Abbreviation_cn= Country.dbo.worlds.cn_name,
                Abbreviation_en=Country.dbo.worlds.en_name,
                Two_code=Country.dbo.worlds.two_code,Three_code=Country.dbo.worlds.free_code
                   FROM Countrys,Country.dbo.worlds WHERE Countrys.chinese_name+' '+Countrys.english_name = Country.dbo.worlds.all_name

 

posted on 2014-05-22 14:57  天使半只翼  阅读(5734)  评论(0编辑  收藏  举报