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>

  • 相关阅读:
    PHP thinkPHP6.0 部署
    ch09 Sql导入语句
    自定义map 搜索
    MySql 语句
    自定义Mappter
    三袋米的故事
    WPF中实现文件夹对话框(OpenFileDialog in WPF)
    web通过Ajax与WCF交互
    项目管理之我见-程序员程序开发步骤
    存储过程
  • 原文地址:https://www.cnblogs.com/leeego-123/p/10836975.html
Copyright © 2011-2022 走看看