摘要: 1.select top 页大小 * from table where id not in (select top 页大小 * (页数-1) id from table order by id) order by id;2.select top 页大小 * from table where id > (select isnull(max(id),0) from (select top 页大小 * (页数-1) id from table order by id)a) order by id;isnull()函数:max(id) 查询ID的最大值,如果为null 返回0,如果不为null 阅读全文
posted @ 2012-07-04 16:15 流星焱雨 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 目录结构:Test.javapackage com.you.me;import java.io.IOException;import java.io.Reader;import java.sql.SQLException;import java.util.List;import com.ibatis.common.resources.Resources;import com.ibatis.sqlmap.client.SqlMapClient;import com.ibatis.sqlmap.client.SqlMapClientBuilder;/** * author:you.me 2010- 阅读全文
posted @ 2012-07-04 11:52 流星焱雨 阅读(923) 评论(0) 推荐(0) 编辑