下面的分页存储过程不是太明白???
ALTER procedure [dbo].[proc_GetEntireActioncomsumes]
@cemeteryid bigint,
@begin int,
@end int
as begin
select count(*) as records from actionconsumec inner join
actionconsumecc on actionconsumec.actionid=actionconsumecc.actionid
where actionconsumec.cemeteryid=@cemeteryid and dateadd(d,-3,consumerTime)<=getdate()
select * from (select actionconsumec.actionid,actionconsumec.consumerTime,
actionconsumecc.shopname,actionconsumec.subusername,actionconsumec.totalmoney,actionconsumec.userid,actionconsumec.username,
row_number() over(order by actionconsumec.consumerTime desc) as aId from actionconsumec inner join actionconsumecc on
actionconsumec.actionid=actionconsumecc.actionid and actionconsumec.cemeteryid=@cemeteryid
and dateadd(d,-3,consumerTime)<=getdate()) as actions
where actions.aId> @begin and actions.aId<=@end
end
下面的分页存储过程不是太明白??? 希望高手帮忙下。谢谢
第一点不明白 有两个选择语句 select count(*) as records 和下面的也有select ??
第2点不明白 row_number() over(order by actionconsumec.consumerTime desc) 这个是什么意思呢?
第3点 where actions.aId> @begin and actions.aId<=@end
更希望能全部语句详细所有意思了? 再谢谢