본문 바로가기

MyBatis

마이바티스 MyBatis order by 동적으로 (조건) 실행하기

<trim prefix="ORDER BY"> 

        <if test="orderby == 'rcode'">  rcode </if>

        <if test="orderby == 'subject'">  subject </if>

</trim>