INSERT INTO class( scls_id , user_id , scls_nm , use_at ) VALUES ( #{sclsId} , #{userId} , #{sclsNm} , 'Y' ); UPDATE class SET scls_nm = #{sclsNm} WHERE scls_id = #{sclsId} UPDATE class SET use_at = 'N' WHERE scls_id = #{sclsId}