上一页:where id=(select max(id) from examination where id < #{id} and class=#{class})
下一页:where id=(select min(id) from examination where id > #{id} and class=#{class})
<小于号,>大于号
非分页中的上一篇下一篇sql语句如何写
原文:http://www.cnblogs.com/sanhao/p/7922608.html