• mybatis include refid="Base_Column_List"含义


    <sql id="Base_Column_List" >

            collegeID, collegeName

    </sql> 

    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >

           select 

            <include refid="Base_Column_List" />

            from t_notification_template

           where id = #{id,jdbcType=BIGINT}

     </select>

     <include refid="Base_Column_List" /> 这个在MyBatis查询数据库的sql中经常会出现。它的在上面已经定义,作用相当于 * ,

    Base_Column_List是固定的几个字段,而用*号的话会降低查询效率,因为后期数据库的字段会不断增加。

    --------------------- 

    作者:ShirleyQueen321 

    来源:CSDN 

    原文:https://blog.csdn.net/weixin_40569991/article/details/88724739 

    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    canvas之碎碎念
    canvas之动态时钟
    属性小问题
    readonly and disabled
    table
    地图热区
    子块元素在父块元素中居中
    Ajax与JS
    前端测试
    html5/css3
  • 原文地址:https://www.cnblogs.com/feng9exe/p/11227439.html
Copyright © 2020-2023  润新知