calling/executing a Stored Procedure which has UDT as input

Posted by Professionaluser under Sql Server category on | Points: 40 | Views : 133
sample code

DECLARE @StudentVariable AS StudentType -- StudentType is a UDT with columns ID, Name and Fee
INSERT INTO @StudentVariable ([StudentID], [StudentName], [StudentFees]) VALUES(1,'Smith','20000')
--Before executing SP, we need to hold the input data (table data) in some table variable(i.e. @StudentVariable )
EXEC dbo.StudentDetailProcedure @StudentVariable

Comments or Responses

Login to post response