iBatis 使用总结

http://blog.csdn.net/caihaijiang/article/details/6438633 --日期格式化
date_format(createtime,'%Y-%m-%d') = '2011-10-17'
得到指定年份、月份、日期
date_format(STR_TO_DATE(birthday,'%Y年%m月%d日'),'%Y') 
 
--模糊查询
错误
1.ibatis中定义
     appname like '%#keyword#%'
2.参数中放入传给ibatis
     param:'%keyword%'
     ibatis:#keyword#
 
正确写法
select * from query_table where appname like concat('%',#keyword#,'%')
 
 
 
原文地址:https://www.cnblogs.com/svennee/p/4078805.html