What are the functions of the MS SQL Server database?

What are the functions of the MS SQL Server database?


->Function is a database object in the SQL server. Basically, it is a set of sql Settlement that accepts only input parameter, performs and returns the result.
->Function can return only a single value or label.
->We can’t use the function to insert, update, delete records in the database table.
Function Types:-
1)Scalar Function:-
The function perform calculation on a input value and return a single value.
example:-
Round(),MID(),LCASE(),UCASE() etc.
2)Aggregate Function:-
Aggregate function operator on a collection of values and returns single value.
i)MAX():-
Select Max(Couloumn_name) as Alias name from table
ii)MIN():-
Select MIN(Couloumn_name) as Alias name from table
iii)AVG():-
Select AVG(Couloumn_name) as Alias name from table
iv)COUNT:-
Select Count(Couloumn_name) as Alias name from table
v)SUM:-
Select SUM(Couloumn_name) as Alias name from table
vi)LOWER():-
Select LOWER(Couloumn_name) as Alias name from table
vii)UPPER:-
Select UPPER(Couloumn_name) as Alias name from table
viii)LTRIM():-
Select LTRIM(‘ vijay’)
ix)RTRIM():-
Select RTRIM(‘ vijay’)
x)Length Aggregate Fucnction:-

Select Coloumn_name, LEN(Couloumn_name) as Alias name from table where id=’1′