728x90 SMALL DB/mybatis2 trim, prefix, prefixoverrides, suffix,suffixOverrides prefix : 실행될 쿼리의 문 안에 쿼리 가장 앞에 붙여준다. UPDATE board username=#{username},password=#{password} prefixOverrides : 실행될 쿼리의 문 안에 쿼리 가장 앞에 해당하는 문자들이 있으면 자동으로 지워준다. SELECT * FROM board WHERE id = #{id} OR TT LIKE '%' || #{searchContent} || '%' suffix : 실행 될 쿼리의 문 안에 쿼리 가장 뒤에 붙여준다. suffixOverrides : 실행될 쿼리의 문 안에 쿼리 가장 뒤에 해당하는 문자들이 있으면 자동으로 지워준다. 2022. 8. 9. mybatis collection size 길이 체크, null체크 mybatis에서 collection을 사용해야하는데 만약 collection이 null이라면 다른 조건을 실행해야 할 때 if나 when을 써서 test ="info != null and info.size != 0" 이런식으로 하면 null check 완료 info는 collection 이름.. select tcc.comm_nm as "rcy_cd" ,tfi.fclt_nm as "fclt_nm" ,th.old_valas "oldValue" ,th.new_val as "value" ,th.mdfy_resn AS "mdfy_resn" ,th.user_id AS "user_id" ,TO_CHAR(th.reg_date, 'yyyy-mm-dd')AS "reg_date" from t_hist_life_mrs th.. 2021. 11. 15. 이전 1 다음 728x90 LIST