SQL Server 2008: Table-Valued Parameters - Part 1

This post discusses about new Table-Valued parameters in SQL Server 2008. As the name suggests, Table-Valued parameters, lets you pass a table as parameter to a stored procedure. In order to use table-valued parameters you need to define a table type and then use the table type in the definition of the stored procedure. Let me illustrate […]

This post discusses about new Table-Valued parameters in SQL Server 2008. As the name suggests, Table-Valued parameters, lets you pass a table as parameter to a stored procedure. In order to use table-valued parameters you need to define a table type and then use the table type in the definition of the stored procedure. Let me illustrate this with the help of an example. I am going to first create a table type named Songs_TableType with two columns, Title and TrackNumber. Then I will use it in a stored procedure to pass a table as parameter.

Full Article