USE [ChiefmesNEW]
GO/****** Object: StoredProcedure [dbo].[st_MES_RS_Pages] Script Date: 04/22/2016 10:16:10 ******/SET ANSI_NULLS OFFGOSET QUOTED_IDENTIFIER OFFGOALTER PROCEDURE [dbo].[st_MES_RS_Pages]( @in_total_rows int = 1 ,@in_pagesize int = -1 ,@in_page int = 1 ,@out_row_from int = 0 output ,@out_row_to int = 0 output)
/************************************************** purpose: 記錄集公用分頁程序, 用以返回當前頁<最小>及<最大>順序號 created by: Wuchun on 2012/10/16 modified log: user/date/remark**************************************************/ASif @in_pagesize > 0 select @out_row_from = ((@in_page-1) * @in_pagesize+1), @out_row_to = (@in_page * @in_pagesize)else select @out_row_from = 1, @out_row_to = @in_total_rows