Introduction : 

         Hi, here i will explain how to call User-Defined Table Type in Store Procedure, previously i have Explained How to create the user-defined Table Type in SQL , Here am calling the same SQL Type to the Store Procedure.

My table Structure as Shown below, the column declared in the User-defined table type should be present in the Table where the records are going to insert.

Table name : StudentDetails

 Here my user-defined table type name is Type_StudentDetails. am creating the Store Procedure to Insert the detail from the created type.

Store Procedure :

Create Procedure InsertStudentDetails
(
 @DetailInsersion Type_StudentDetails Readonly
)
As
Begin
insert into StudentDetails(StudentName,RegistrationNumber,Department,FatherName)
select StudentName,RegistrationNumber,Department,FatherName from @DetailInsersion
End
GO