Microsoft SQL Server User Defined Table Types

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

User defined table types (UDT for short) are data types that allows the user to define a table structure. User defined table types supports primary keys, unique constraints and default values.

Remarks

UDTs have following restrictions -

  • can not be used as a column in a table or a field in a structured user-defined types
  • a non-clustered index cannot be created in a UDT unless the index is the result of creating a PRIMARY KEY or UNIQUE constraint on the UDT
  • UDT definition CANNOT be modified after it is created


Got any Microsoft SQL Server Question?