Sql – T-SQL: Concept similar to C# params

sqlsql-server-2005tsql

Does T-SQL allow a variable number of arguments to a stored procedure like params in C#?

EDIT: I'm using SQL Server 2005. That 2008 answer makes me wish we were using it…

Best Answer

In SQL 2008 there's Table-Valued Parameters (TVPs)

Your stored proc can accept lists of parameters..

Finally we're able to do a IN clause without relying on XML!

Mike