2005年1月12日

分页查询的存储过程

摘要: 1.id是数字型或有序的字符型第一页、上一页、下一页都可用select top n * from 表 where id>=参数值最后一页select @m=count(*) from 表@m=n%@mselect top@m * from 表 into #tmp1 order by id descselect * from #tmp1 order by id或者select * from 表 where id not in (selecttop xfrom 表)2.create proc GetAuthors@Author_Last_Name as varchar(100) = null 阅读全文

posted @ 2005-01-12 22:21 zyi 阅读(167) 评论(0) 推荐(0) 编辑

导航