Table Valued Parameters (TVPs) and User Defined Table Types (UDTTs)

Table Valued Parameters and User Defined Table Type are available from SQL Server 2008 but still many developers are not aware of it. Before SQL Server 2008 it was not possible to pass a table variable to a stored procedure, for that case we mostly relied on xml data type to send multiple rows to a stored procedure. Now we can use Table Valued Parameters in stored procedure, and to use Table Valued Parameters we need to create a User Defined Table Type.

User Defined Table Type and Table Valued Parameter

A user-defined table type is a user-defined type that represents the definition of a table structure. You can use a user-defined table type to declare table-valued parameters for stored procedures or functions, or to declare table variables that you want to use in a batch or in the body of a stored procedure or function. Using Table Valued Parameter we can easily pass multi row data to stored procedure.

Read more from