Back-end/SQL

<MyBatis> 쿼리에서 부등호 사용

madison 2020. 6. 9. 11:42

 

Mybatis select절을 CDATA로 감싸거나 부등호를 특정 문자열로 치환해줘야 에러가 안난다. 

select * from table_name where rownum &gt 1000;   // >  rownum이 1001이상인 데이터 
select * from table_name where rownum &lt 1000;	  // < rownum이 999이하인 데이터