USE [IpointsInterface]GO/****** Object: StoredProcedure [dbo].[VendorProductType_SelectPage] Script Date: 11/07/2012 17:59:06 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: Wayne Chen-- Create date: 2012-11-07-- Description: 获取大类对象分页-- =============================================ALTER PROCEDURE [dbo].[VendorProductType_SelectPage] @VendorIndex INT, @TypeCode varchar(32), @TypeName NVARCHAR(50), @PageSize int, @PageIndex int, @TotalCount int outputASBEGIN SET NOCOUNT ON; DECLARE @Start INT,@End INT SET @Start = (@PageIndex -1) * @PageSize+1; SET @End = @PageIndex *@PageSize -- Insert statements for procedure here SELECT @TotalCount = COUNT(1) FROM VendorProductType(NOLOCK) WHERE VendorIndex=@VendorIndex AND (TypeCode LIKE @TypeCode) AND (TypeName LIKE @TypeName) SELECT * FROM( SELECT ROW_NUMBER() OVER(ORDER BY VendorProductTypeIndex ASC) iRowNum,* FROM VendorProductType(NOLOCK) WHERE VendorIndex=@VendorIndex AND (TypeCode LIKE @TypeCode) AND (TypeName LIKE @TypeName)) AS [TMP] WHERE iRowNum BETWEEN @Start AND @EndEND
具体怎么调用
5 回答
侃侃尔雅
TA贡献1801条经验 获得超16个赞
数据库中调用就是 exec 存储过程名字 参数1,参数2 如果有输出参数 需要定义output..
程序中调用就需要传参了 sqlparameter 封装好跟存储过程名字一起发到数据库
- 5 回答
- 0 关注
- 657 浏览
添加回答
举报
0/150
提交
取消