zoukankan      html  css  js  c++  java
  • INSERT into ... on duplicate key update ...

    INSERT  into exception_report_total (
             waitFillOrders
            ,waitSendOrders
            ,changeOrders
            ,changeTotal
            ,waitProduceOrders
            ,wmsStockOrders
            ,erpStockOrders
            ,waitReserveOrders
            ,waitDispatchOrders
            ,addDispatchOrders
            ,waitCancel
            ,sendExceptions
            ,reserveOrders
            ,create_time
            ,carrier_id
            ,carrier_name
            ,dc_id
            ,dc_name
            ,org_id
            ,org_name
            )
            values
            <foreach collection="list" item="item" index="index" separator="," >
                (
                #{item.waitFillOrders}
                ,#{item.waitSendOrders}
                ,#{item.changeOrders}
                ,#{item.changeTotal}
                ,#{item.waitProduceOrders}
                ,#{item.wmsStockOrders}
                ,#{item.erpStockOrders}
                ,#{item.waitReserveOrders}
                ,#{item.waitDispatchOrders}
                ,#{item.addDispatchOrders}
                ,#{item.waitCancel}
                ,#{item.sendExceptions}
                ,#{item.reserveOrders}
                 ,now()
                ,#{item.carrier_id}
                ,#{item.carrier_name}
                ,#{item.dc_id}
                ,#{item.dc_name}
                ,#{item.org_id}
                ,#{item.org_name}
                )
            </foreach>
            on duplicate key update
            waitFillOrders = values(waitFillOrders),
            waitSendOrders = values(waitSendOrders),
            changeOrders = values(changeOrders),
            changeTotal = values(changeTotal),
            waitProduceOrders = values(waitProduceOrders),
            wmsStockOrders = values(wmsStockOrders),
            erpStockOrders = values(erpStockOrders),
            waitReserveOrders = values(waitReserveOrders),
            waitDispatchOrders = values(waitDispatchOrders),
            addDispatchOrders = values(addDispatchOrders),
            waitCancel = values(waitCancel),
            sendExceptions = values(sendExceptions),
            reserveOrders = values(reserveOrders)
  • 相关阅读:
    centos rm -rf 恢复删除的文件
    默认hosts后面为files dns
    linux shell expr 使用
    QQ,MSN,Skype在线客服代码
    LocalResizeIMG前端HTML5本地压缩图片上传,兼容移动设备IOS,android
    php读取和保存base64编码的图片内容
    linux shell 字符串操作(长度,查找,替换)详解
    tomcat的简单配置与适用默认的web应用
    mybatis左连接需要输出左表的指定内容与筛选
    first head in html 笔记
  • 原文地址:https://www.cnblogs.com/olmlo/p/5144704.html
Copyright © 2011-2022 走看看