Programming in MS SQL Server 2012

Built-in Functions



The Transact-SQL programming language provides three types of functions.

Rowset Function

Can be used like table references in an SQL statement.

Aggregate Functions

Operate on a collection of values but return a single, summarizing data value.

Scalar Functions

Operate on a single value and then return a single data value. Scalar functions can be used wherever an expression is valid. The following table describes types of scalar functions.

Mathematical Functions ABS, CEILING, FLOOR, POWER, ROUND
String Functions ASCII, CHAR, LEFT, RIGHT, LTRIM, RTRIM, SUBSTRING, LOWER, UPPER, LEN, REVERSE, REPLACE, SPACE, STR
Date and Time Functions GETDATE, DAY, MONTH, YEAR, DATEADD, DATEDIFF, DATENAME, DATEPART
Configuration Functions @@LANGID, @@LANGUAGE, @@MAX_CONNECTIONS, @@SERVERNAME, @@VERSION
Metadata Function DB_NAME
System Functions APP_NAME, HOST_ID, HOST_NAME, ISDATE, ISNUMERIC, ISNULL, SERVERPROPERTY

* * * * *


Email Your Comment To AUTHOR