Spring,MyBatis 실무 과정 자료] 동적 SQL 샘플





Spring,MyBatis 실무 과정 자료] 동적 SQL 샘플

실무개발자를위한 실무교육 전문교육센터학원

www.oraclejava.co.kr에 오시면 보다 다양한 강좌를 보실 수 있습니다.



동적 SQL 샘플


<select id="findEmp" parameterType=“Emp" resultMap=“empResultMap">

        SELECT * FROM EMP

        <where>

            <if test=“ename != null ">

                ENAME = #{ename}

            </if>

            <if test=“mgr != null ">

                AND MGR = #{mgr}

            </if>

         </where>    

    </select> 



+ Recent posts