sql语句choose/when/otherwise使用注意
1.test中的key不能使用特殊字符 - 或者 +
2.test中的判断仅对!= null有效,不能使用==对字符串判断
3.示例:
<choose>
<when test='sortIdOrder != null'>
order by sort_id desc
</when>
<otherwise>
order by create_time desc
</otherwise>
</choose>
最后
以上就是调皮手套最近收集整理的关于sql语句choose/when/otherwise使用注意的全部内容,更多相关sql语句choose/when/otherwise使用注意内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复