SQL Server 2005 provides built-in functions that can be used to perform certain operations. Functions can be used or included in the following:
– The select list of a query that uses a SELECT statement to return a value.
– A WHERE clauses search condition of a SELECT statement to limit the rows that qualify for the query.
Syntax for executing a function:
SELECT <Fun Name> ( [ <expressions> ] )
-The expression can be a constant values or a name of a column.
Functions can be classified into 2 types:
- Single Row Functions
- Group Functions
A single row function executes once for each row that is present in the table where as group functions take multiple rows into consideration and returns a single value as output.
Single Row Function Categories:
Reference : Dilip Kumar Jena ( https://sqlexplore.wordpress.com )