drop procedure Emp_fy
create procedure Emp_fy
(
@rows int,
@page int,
@tabName varchar(20)
)
as
declare @str varchar(2000)
set @str='select top '+STR(@rows)+' * from
(select ROW_NUMBER() over(order by Emp_Id)as rownum,* from '+@tabName+')
as A where rownum >'+STR(@rows*(@page-1))+''
exec (@str)
若有疑问可以联系我www.jiangyong.net.cn,里面有我的QQ