1、预定义字符
< <=相当于=> < 小于号 > <=相当于=> > 大于号
案例:
<select id="a" parameterType="java.lang.String" resultType="com.gao.entity.MyDemo">
select *
from 数据库表2
(
select *
from 数据库表1
where id = #{id}
)
where rownum <= 10
</select>
2、使用 CDdata
<![CDATA[sql语句]]>
案例:
<select id="a" parameterType="java.lang.String" resultType="com.gao.entity.MyDemo"> <![CDATA[ select * from 数据库表2 ( select * from 数据库表1 where id = #{id} ) where
rownum <= 10 ]]> </select>
标签:大于号,特殊符号,小于号,lt,where,id,select From: https://www.cnblogs.com/Life-QX/p/16887710.html