DEV Community


SQL Server Table Valued Parameters with .NET

jtenos profile image Joe Enos ・1 min read

Table valued parameters in SQL Server give you the ability to pass in multiple values in a table that can be directly queried inside the procedure or prepared statement. This can be useful for passing in collections of simple values, multi record inserts, or for many other reasons.

.NET gives you a couple different options, like most things in ADO.NET - you can use type-safe objects with a little extra work, or you can use a simple DataTable.

Here's an example showing both ways.

Discussion (0)

Forem Open with the Forem app