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;    "

原文地址:https://www.cnblogs.com/telwanggs/p/11056481.html