`
cpine
  • 浏览: 53339 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

分页查询的SQL存储过程

SQL 
阅读更多
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

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics