< |
< |
小于号 |
> |
> |
大于号 |
& |
& |
和 |
' |
’ |
单引号 |
" |
" |
双引号 |
MyBatis转义
最新推荐文章于 2024-06-19 14:05:50 发布
比如在数据库中查询语句是:where inv.amount < eit.thresholdnum
两种方法 :
一、直接使用转义符
例子:where inv.amount < eit.thresholdnum
二、使用放在 <![CDATA[ ]]> 就可以了,例子:
where <![CDATA[
inv.amount < eit.thresholdnum
]]>