Function In SQL Server Part VIII
Function IN SQL Server Function : A function is a set of SQL statements that perform a specific task. Functions foster code reusability. There are Two Type of Function : A) System Defined Function : System functions are built-in database functions. There are two types of system-defined functions in SQL Server : 1) System Scalar Functions : Scalar are on single value and returns single value. 2) System Aggregate Functions : Aggregates the values and return a single value. B) User-Defined Function : User-defined functions are create by a user. There are three types of user-defined functions in SQL Server : Table : tblCustomer 1) Scalar Function : It is a function that takes one or more values but returns a single value. Steps : 1) Select Function then Right click on Function and select new Scalar-valued Function in Programmability : 2) Example - Create Scalar-valued Function : 3) Scalar-valued Function Created Successfully