首页 > 数据库技术 > 详细

sql-表值函数tvf

时间:2015-04-17 15:11:58      阅读:286      评论:0      收藏:0      [点我收藏+]

带有参数的视图

  create function fn_fenye
  (@count as int,@page as int) returns table
  as
  return
  select * from (select row_number() over (order by id)as num,* from dbo.Scores) as tableA
  where tableA.num between @count*(@page-1)+1 and @count*@page
 
  select * from fn_fenye(3,2)

  技术分享技术分享

技术分享

sql-表值函数tvf

原文:http://www.cnblogs.com/mongo/p/4434834.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!