现在的位置: 首页 > 综合 > 正文

蹩脚的Access分页语句

2012年07月26日 ⁄ 综合 ⁄ 共 400字 ⁄ 字号 评论关闭
数据量大了,必然导致性能降低,但是又没找到更好的方法----囧
DECLARE @PageSiz INT, @CurPage INT 
SET @PageSiz = 10  
SET @CurPage = 28 
select top (@PageSiz)  *  from JS_ARTICLE
where [GUID] not in(
select top ((@CurPage-1)*@PageSiz) [GUID] from JS_ARTICLE where  ArticleID not in (33,36,39) and ClassId='7f57a331-1e17-46ef-aaea-a6c0d1f0f0c7' order by ArticleID,[GUID])
and ArticleID not in (33,36,39) and ClassId='7f57a331-1e17-46ef-aaea-a6c0d1f0f0c7' order by ArticleID,[GUID]

抱歉!评论已关闭.