11

From msdn website I get the following:

A special data type for specifying structured data contained in table-valued parameters.

It seems my code works with it and without it (pushing table to DB using stored procedure).

Can someone explain what does it do - I didn't understand it from the definition.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Zbun
  • 4,875
  • 4
  • 19
  • 28

1 Answers1

14

In SQL Server, you can define stored procedures and you can pass tables as parameter. This is then called a table valued parameter.

When you are programming in C#, you can pass such a table-valued parameter to the database by using the SqlDbType.Structured constant.

This post shows an example: How to pass a table-value parameter

Community
  • 1
  • 1
SQL Police
  • 4,127
  • 1
  • 25
  • 54
  • Is there any way to log structured SqlDbType as a string, right now I'm able to log other types by converting them into string ToString(), but structured type always converts into a blank string. – Thrainder Oct 07 '22 at 11:39