zoukankan      html  css  js  c++  java
  • 【转】关于联合表更新问题

    哥本哈根
    对下面两个表:   
      table1:   
      id         cityid         cityname   
      
    1                               北京   
      
    2                             上海   
      
    3                               重庆   
      
    4                               天津   
        
      table2:   
      id           cityname   
      
    1               上海   
      
    2               北京   
      
    3               重庆   
        
      我现在想实现把table2的id插入到table1 中的cityid字段,条件就是两个cityname字段相等?谢谢
      
      答案:
      
    update   A   set   A.cityid=B.id
      
    from   table1   A   inner   join   table2   B   on   A.cityname=B.cityname   
    转自:http:
    //topic.csdn.net/t/20060816/18/4954556.html
  • 相关阅读:
    svn不提交.net项目中的bin
    java 与C# 时间格式 交互
    生成菜单序列号
    ashx 方法模板
    webservice使用方法
    如何配置IIS服务器?
    zepto.fullpage
    模拟单选框
    star score
    Hover show tips
  • 原文地址:https://www.cnblogs.com/gebenhagen/p/1721315.html
Copyright © 2011-2022 走看看