我是靠谱客的博主 调皮手套,这篇文章主要介绍sql语句choose/when/otherwise使用注意,现在分享给大家,希望可以做个参考。

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使用注意内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(165)

评论列表共有 0 条评论

立即
投稿
返回
顶部