SQL Server : User Defined Functions in SQL

User Defined Functions in SQL


User Defined Functions are routines which performs calculation or operation to return a value or result set. It can accept input parameters too.


Types of User Defined Functions in SQL

  1. Scalar Function – Returns a single data value of the type defined in the RETURNS clause. The return type can be any data type except text,ntextimagecursor, and timestamp
  2. Table-Valued Function – Returns a table data type. 

Leave a Reply