mybatis concat

数据库模糊查询concat 使用

 <select id="find4" resultType="project.Dao.Department">
        select * from department
        where id like concat('%',#{id},'%') and departmentName like concat('%',#{name},'%')
        order by ${group} desc

    </select>

mybatis #{name}占位符替换 ${group} 为原值替换


版权声明:本文为weixin_43616283原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。