ITeye博客

分页查询的SQL存储过程

cpine · 2010-01-29 11:40 · ASP.NET · 编程语言 · Markdown

select top 5 * from student

alter procedure selectTopN
@count int
as
begin
declare @topCount varchar(1000)
set @topCount='select top '+convert(varchar,@count)+' * from student'
exec(@topCount)
end
 

exec selectTopN 10

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。