C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着
create proc Pages(@current int,@size int) as begin declare @sql varchar(500) declare @before int set @current = @current-1 if @current<1 begin set @current=0 end set @before=@size*@current set @sql='select top '+cast(@size as varchar(10))+' * from titles where title_id not in(select top '+cast(@before as varchar(10))+' title_id from titles order by pubdate) order by pubdate' exec(@sql) end go exec Pages 3,20
posted on 2008-06-12 00:03  王德田  阅读(174)  评论(0编辑  收藏  举报