zoukankan      html  css  js  c++  java
  • Update 更新语句使用两个表关联

    =============错误例子=======================================

    update tcodeLocation
    set plocationid = p.LocationID
    from TcodeLocation t , tcodelocation p where p.locationcode=t.plocationcode 
    and t.locationlevel>1 

    =============正确=======================================

    update t    ---  (使用别名)
    set plocationid = p.LocationID
    from TcodeLocation t , tcodelocation p where p.locationcode=t.plocationcode
    and t.locationlevel>1

  • 相关阅读:
    20201107
    20201024
    20201020
    20200331
    20200330
    20200320
    20200319
    20200310
    20200221
    20190926
  • 原文地址:https://www.cnblogs.com/CNQCJ/p/7886053.html
Copyright © 2011-2022 走看看