mybatis sql不等于

 转载地址:    https://blog.csdn.net/weixin_40797576/article/details/78796028

select from test where id<>1;

但是mybatis报错 <> 应该转义  &lt;&gt; 

select from test where id &lt;&gt; 1;

 

 

使用mybatis的时候,特殊字符,例如<,>,<>,.....

需使用以下进行转义

&lt;     < 
&gt;     >  
&lt;&gt;   <>
&amp;     & 
&apos;    '
&quot;    "

posted @ 2019-06-20 08:28  疯子110  阅读(54045)  评论(0编辑  收藏  举报