【发布时间】:2009-03-29 20:08:04
【问题描述】:
SQL 2005 中有哪些选项可以将多个值传递给存储过程
伪代码
在 C# 代码中
List<string> myApplicationList;
.... (code to assign values)
**Construct parameter list**
Call stored procedure [spSelectMaster] with myApplicationList
SQL 存储过程
CREATE PROCEDURE [Ecn].[spSelectMaster]
**Need to declare parameter here but not sure what this would be**
AS
BEGIN
SET NOCOUNT ON
SELECT *
FROM [dbo].[Master]
WHERE [Master].[ApplicationKey] IN (@ApplicationList)
END
GO
提前致谢
【问题讨论】:
标签: sql-server-2005 stored-procedures