select s.*from( select t.*,rownum rowindex from tablename t)swhere rowindex<![CDATA[<]]>=#{lastRow} and rowindex<![CDATA[>]]>=#{firstRow}
来源: http://www.phpxs.com/code/1008625/