zoukankan      html  css  js  c++  java
  • insertSql语句中的trim标签的使用

    insert into MB_BATCH_DIS_DETAILS
        <trim prefix="(" suffix=")" suffixOverrides=",">
          <if test="batchNo != null">
            BATCH_NO,
          </if>
          <if test="seqNo != null">
            SEQ_NO,
          </if>
          <if test="contractNo != null">
            CONTRACT_NO,
          </if>
          <if test="prodType != null">
            PROD_TYPE,
          </if>
          <if test="discSubType != null">
            DISC_SUB_TYPE,
          </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="batchNo != null">
            #{batchNo,jdbcType=VARCHAR},
          </if>
          <if test="seqNo != null">
            #{seqNo,jdbcType=VARCHAR},
          </if>
          <if test="contractNo != null">
            #{contractNo,jdbcType=VARCHAR},
          </if>
          <if test="prodType != null">
            #{prodType,jdbcType=VARCHAR},
          </if>
          <if test="discSubType != null">
            #{discSubType,jdbcType=VARCHAR},
          </if>
        </trim>
      </insert>

  • 相关阅读:
    升级Visual Studio安装已完成,出现警告
    C# 字符串格式
    C# TimeSpan
    git 手册
    Mac clion 远程调试 linux 服务器进程
    C++ 左值引用和右值引用的用处
    Mac OS 快捷键
    MacPorts Guide
    同步异步阻塞非阻塞
    tcp 简单实现
  • 原文地址:https://www.cnblogs.com/leeego-123/p/10836975.html
Copyright © 2011-2022 走看看