Chapter 10 of this book. This appendix provides a comprehensive list of the functions available for each RDBMS in its current version: Oracle 9i, IBM DB2 UDB 8.1, and Microsoft SQL Server 2000.
All the functions are grouped in Tables G-1 through G-24 similarly to the way they are organized in each corresponding vendor's documentation. Oracle 9i allows overloading of the functions, meaning that some functions can be used in more than one way depending on the data type and number of arguments; because of that such functions are listed in several categories. IBM rarely provides overloaded functions, and Microsoft stands somewhere between Oracle and IBM in this regard.
Certain functions require appropriate privileges to be run, as well as specific output result holders. We've omitted the arguments of the functions from the tables, because the purpose of the appendix is to show what is available, without going into too much detail. Refer to each vendor's documentation for more detailed syntax and explanations.
Function Name |
Brief Description |
---|---|
ABS |
Returns the absolute value of n. |
ACOS |
Returns the arc cosine of n. |
ASIN |
Returns the arc sine of n. |
ATAN |
Returns the arc tangent of n. |
ATAN2 |
Returns the arc tangent of n and m. |
BITAND |
Returns an integer. |
CEIL |
Returns the smallest integer greater than or equal to n. |
COS |
Returns the cosine of n. |
COSH |
Returns the hyperbolic cosine of n. |
EXP |
Returns e raised to the nth power, where e=2.71828183. |
FLOOR |
Returns the largest integer equal to or less than n. |
LN |
Returns the natural logarithm of n, where n is greater than 0. |
LOG |
Returns the logarithm, base m, of n. |
MOD |
Returns the remainder of m divided by n. Returns m if n is 0. |
POWER |
Returns m raised to the nth power. |
SIGN |
If n<0, SIGN returns –1. If n=0, the function returns 0. If n>0, SIGN returns 1. |
SINH |
Returns the hyperbolic sine of n. |
SQRT |
Returns the square root of n. |
TAN |
Returns the tangent of n. |
TANH |
Returns the hyperbolic tangent of n. |
TRUNC |
Returns a value truncated to m decimal places. If m is omitted, n is truncated to 0 places. m can be negative to truncate (make zero) m digits left of the decimal point. |
WIDTH_BUCKET |
Lets you construct equiwidth histograms, in which the histogram range is divided into intervals that have identical size. |
Function Name |
Brief Description |
---|---|
DEREF |
Returns the object reference of an argument expression, where expression must return a REF to an object. |
MAKE_REF |
Creates a REF to a row of an object view or a row in an object table whose object identifier is primary-key based. |
REF |
Returns a REF value for the object instance that is bound to the variable or row. |
REFTOHEX |
Converts an argument expression to a character value containing its hexadecimal equivalent. The expression must return a REF. |
VALUE |
Takes as its argument a correlation variable (table alias) associated with a row of an object table and returns object instances stored in the object table. The type of the object instance is the same type as the object table. |
Brief Description |
|
---|---|
ABS[VAL] |
Returns the absolute value of a number n. |
ACOS |
Returns the arccosine of the argument as an angle expressed in radians. |
ASCII |
Returns the ASCII code of the first character of a string. |
ASIN |
Returns the arcsine of the argument as an angle expressed in radians. |
ATAN |
Returns the arctangent of the argument as an angle expressed in radians. |
ATAN2 |
Returns the arctangent of x and y coordinates as an angle expressed in radians. The x and y coordinates are specified by the first and second arguments, respectively. |
BIGINT |
Returns a 64-bit integer representation of a number or character string in the form of an integer constant. |
BLOB |
Returns a BLOB representation of a string of any type. |
CEIL[ING] |
Returns the smallest integer that is greater than or equal to n. |
CHAR |
Converts argument expression into a character string. |
CHR |
Returns a character for the ASCII code. |
CLOB |
Returns a CLOB representation of a character string type. |
COALESCE |
Returns the first argument on the list that is not NULL. |
CONCAT |
Returns result of concatenation of two strings. |
COS |
Returns the cosine of the argument, where the argument is an angle expressed in radians. |
COT |
Returns the cotangent of the argument, where the argument is an angle expressed in radians. |
DATE |
Returns a date from a value. |
DAY |
Returns the day part of a value. |
DAYNAME |
Returns a mixed-case character string containing the name of the day for the day portion of the argument based on the locale where the database was started. |
DAYOFWEEK |
Returns the day of the week in the argument as an integer value in the range of 1–7, where 1 represents Sunday. |
DAYOFWEEK_ISO |
Returns the day of the week in the argument as an integer value in the range of 1–7, where 1 represents Monday. |
DAYOFYEAR |
Returns the day of the year in the argument as an integer value in the range of 1–366. |
DAYS |
Returns an integer representation of a date. |
DBCLOB |
Returns a DBCLOB representation of a graphic string type. |
DEC[IMAL] |
Returns a decimal representation of a number, a character string representation of a decimal number, or a character string representation of an integer number. |
DECRYPT_BIN |
Returns a value that is the result of decrypting encrypted data. |
DECRYPT_CHAR |
Returns a value that is the result of decrypting encrypted data. |
DEGREES |
Returns the number of degrees converted from the argument expressed in radians. |
Function Name |
Brief Description |
DEREF |
Returns an instance of the target type of the argument. |
DIFFERENCE |
Returns a value from 0 to 4 representing the difference between the sounds of two strings based on applying the SOUNDEX function to the strings. A value of 4 is the best possible sound match. |
DIGITS |
Returns a character-string representation of a number. |
DLCOMMENT |
Returns the comment value, if it exists, from a DATALINK value. |
DLLINKTYPE |
Returns the linktype value from a DATALINK value. |
DLURLCOMPLETE |
Returns the data location attribute from a DATALINK value with a linktype of URL. |
DLURLPATH |
Returns the path and file name necessary to access a file within a given server from a DATALINK value with a linktype of URL. |
DLURLPATHONLY |
Returns the path necessary to access a file within a given server from a DATALINK value with a linktype of URL. |
DLURLSCHEME |
Returns the scheme from a DATALINK value with a linktype of URL. |
DLURLSERVER |
Returns the file server from a DATALINK value with a linktype of URL. |
DLVALUE |
Returns a DATALINK value. |
DOUBLE |
Returns a floating-point number corresponding to a number if the argument is a numeric expression character string, or a representation of a number if the argument is a string expression. |
ENCRYPT |
Returns a value that is the result of encrypting a data-string expression. |
EVENT_MON_STATE |
Returns the current state of an event monitor. |
EXP |
Returns the exponential value of n. |
FLOAT |
Returns a floating-point representation of a number. |
FLOOR |
Returns the largest integer less than or equal to n. |
GETHINT |
Returns will return the password hint if one is found in the encrypted data. |
GENERATE_UNIQUE |
Returns a bit-data character string 13 bytes long (CHAR(13) FOR BIT DATA) that is unique when compared to any other execution of the same function. |
GRAPHIC |
Returns a GRAPHIC representation of a graphic string type. |
HEX |
Returns a hexadecimal representation of a value as a character string. |
HOUR |
Returns the hour part of a value. |
IDENTITY_VAL_LOCAL |
Returns the most recently assigned value for an identity column, where the assignment occurred as a result of a single row INSERT statement using a VALUES clause. |
INSERT |
Returns a string where expression3 bytes have been deleted from expression1 beginning at expression2, and where expression4 has been inserted into expression1 beginning at expression2. |
INTEGER |
Returns an integer representation of a number or character string in the form of an integer constant. |
JULIAN_DAY |
Returns an integer value representing the number of days from January 1, 4712 B.C. (the start of the Julian date calendar) to the date value specified in the argument. |
LOWER |
Converts all characters in a string to lowercase. |
Function Name |
Brief Description |
LCASE |
Converts all characters in a string to lowercase. |
LEFT |
Returns n number of characters starting from the left. |
LENGTH |
Returns the number of characters in a string. |
LN |
Returns the natural logarithm of the argument. |
LOCATE |
Returns the position of an occurrence of a substring within the string. |
LOG |
Returns the natural logarithm of the argument (same as LN). |
LOG10 |
Returns the base 10 logarithm of the argument. |
LONG_VARCHAR |
Returns a LONG VARCHAR representation of a character string data type. |
LONG_VARGRAPHIC |
Returns a LONG VARGRAPHIC representation of a double-byte character string. |
LTRIM |
Trims leading spaces off the string. |
MICROSECOND |
Returns the microsecond part of a value. |
MIDNIGHT_SECONDS |
Returns an integer value, which represents the number of seconds between midnight and the time value specified in the argument. |
MINUTE |
Returns the minute part of a value. |
MOD |
Returns the remainder of n divided by m. |
MONTH |
Returns the month part of a value. |
MONTHNAME |
Returns a mixed-case character string containing the name of month for the month portion of the argument, based on the locale where the database was started. |
MQPUBLISH |
Returns published data to MQSeries. |
MQREAD |
Returns a message from the MQSeries location specified by receive-service. The read is non-destructive — i.e. the message itself remains in the queue. |
MQRECEIVE |
Same as above, but the message in the queue is destroyed. |
MQSEND |
Sends the data contained in message data to the MQSeries location specified by send-service, using the quality of service policy defined by service-policy. |
MQSUBSCRIBE |
Used to register interest in MQSeries messages published on a specified topic. |
MQUNSUBSCRIBE |
Used to unregister an existing message subscription. |
MULTIPLY_ALT |
Returns the product of the two arguments as a decimal value. |
NODENUMBER |
Returns the partition number of the row. |
NULLIF |
Returns a NULL value if the arguments are equal, otherwise it returns the value of the first argument. |
PARTITION |
Returns the partitioning map index of the row obtained by applying the partitioning function on the partitioning key value of the row. |
POSSTR |
Returns the position of an occurrence of a substring within the string. The POSSTR test is case-sensitive |
POWER |
Returns value of m raised to the nth power. |
QUARTER |
Returns an integer value in the range of 1 to 4, which represents the quarter of the year for the date specified in the argument. |
RADIANS |
Returns the number of radians converted from an argument, which is expressed in degrees. |
Function Name |
Brief Description |
RAISE_ERROR |
Causes the statement that includes the function to return an error with the specified SQLSTATE, SQLCODE, and diagnostic-string. |
RAND |
Returns a random floating-point value between 0 and 1 using the argument as the optional seed value. |
REAL |
Returns a single-precision, floating-point representation of a number. |
REC2XML |
Returns a string formatted with XML tags and containing column names and column data. |
REPEAT |
Returns string1 repeated n times. |
REPLACE |
Replaces all occurrences of expression2 in expression1 with expression3. |
RIGHT |
Returns a string consisting of the riost expression2 bytes in expression1. |
ROUND |
Returns number n rounded to m decimal places. |
RTRIM |
Returns the characters of the argument with trailing blanks removed. |
SECOND |
Returns the seconds part of a time value/expression. |
SIGN |
Returns an indicator of the sign of the argument. If the argument is less than zero, -1 is returned. If argument equals zero, 0 is returned. If argument is greater than zero, 1 is returned. |
SIN |
Returns the sine of the argument, where the argument is an angle expressed in radians. |
SMALLINT |
Returns a small integer representation of a number or character string in the form of a small integer constant. |
SOUNDEX |
Returns a four-character code representing the sound of the words in the argument. |
SPACE |
Returns a string of n blanks. |
SQRT |
Returns the square root of the argument. |
SUBSTR |
Returns a part of a string starting from nth characters for the length of m characters. |
TABLE_NAME |
Returns the unqualified name of the object found after any alias chains have been resolved. |
TABLE_SCHEMA |
Returns the schema name of the object found after any alias chains have been resolved. |
TAN |
Returns the tangent of the argument, where the argument is an angle expressed in radians. |
TIME |
Returns a time from a value. |
TAMESTAMP |
Returns a timestamp from a value or a pair of values. |
TIMESTAMP_ISO |
Returns a timestamp value based on date, time, or timestamp argument. |
TIMESTAMPDIFF |
Returns an estimated number of intervals of the type defined by the first argument, based on the difference between two timestamps. |
TRANSLATE |
Replaces all occurrences of string1 within string2 translated into string3. |
TRUN[CATE] |
Returns n truncated to m decimal places. |
Function Name |
Brief Description |
TYPE_ID |
Returns the internal type identifier of the dynamic data type of the expression. |
TYPE_NAME |
Returns the unqualified name of the dynamic data type of the expression. |
TYPE_SCHEMA |
Returns the schema name of the dynamic data type of the expression. |
UCASE |
Returns a string converted into UPPER case. |
UPPER |
Returns a string converted into UPPER case. |
VALUE |
Returns the first argument that is not NULL. |
VARCHAR |
Returns a varying-length character string representation of a character string, datetime value, or graphic string. |
VARGRAPHIC |
Returns a graphic string representation of a character string value, converting single-byte characters to double-byte characters; or a graphic string value, if the first argument is any type of graphic string. |
WEEK |
Returns the week of the year of the argument as an integer value in the range of 1–54. The week starts with Sunday. |
WEEK_ISO |
Returns the week of the year of the argument as an integer value in the range 1–53. |
YEAR |
Returns the year part of a value. |
Function Name |
Brief Description |
---|---|
AVG |
Returns the average of a set of numbers. |
CORR[ELATION] |
Returns the coefficient of correlation of a set of number pairs. |
COUNT |
Returns the number of rows or values in a set of rows or values. |
COUNT_BIG |
Returns the number of rows or values in a set of rows or values. It is similar to COUNT except that the result can be greater than the maximum value of integer. |
COVARIANCE |
Returns the (population) covariance of a set of number pairs. |
GROUPING |
In conjunction with the GROUP BY clause, returns a value that indicates whether a row returned in a GROUP BY set is a row generated by a grouping set that excludes the column represented by an expression. |
MAX |
Returns the maximum value in a set of values. |
MIN |
Returns the minimum value in a set of values. |
STDDEV |
Returns the standard deviation of a set of numbers. |
SUM |
Returns the sum of a set of numbers. |
VAR[IANCE] |
Returns the variance of a set of numbers. |
Brief Description |
|
---|---|
MQREADALL |
Returns a table containing the messages and message metadata from the MQSeries location specified by receive service, using the quality of service policy. |
MQRECEIVEALL |
Returns a table containing the messages and message metadata from the MQSeries location specified by receive service.. The read is non-desctructive — i.e. the message itself remains in the queue. |
SQLCACHE_SNAPSHOT |
Returns the results of a snapshot of the DB2 dynamic SQL statement cache. |
Function Name |
Brief Description |
---|---|
GET_ROUTINE_SAR |
Retrieves the necessary information to install the same routine in another database server, running at the same level on the same operating system. |
PUT_ROUTINE_SAR |
Passes the necessary file to create an SQL routine at the server and then defines the routine. |
Brief Description |
|
---|---|
ASCII |
Returns the ASCII code of the first character in the expression. |
CHAR |
Returns the character for the ASCII code. |
CHARINDEX |
Returns the first position of the first occurrence of the expression within another expression. |
DIFFERENCE |
Returns the integer difference between two SOUNDEX expressions. |
LEFT |
Returns part of the expression starting from a specific character to the left. |
LEN |
Returns number of characters in the expression, excluding trailing blank spaces. |
LOWER |
Returns an expression with all characters converted to lowercase. |
LTRIM |
Returns an expression without left trailing blanks. |
NCHAR |
Returns a Unicode character from the code number. |
PATINDEX |
Returns starting position of the first occurrence of a pattern within a specified expression. |
REPLACE |
Returns string where all occurrences of the second expression within the first expression are replaced with the third expression. |
QUOTENAME |
Returns a Unicode expression with delimiters added for validation. |
REPLICATE |
Returns an expression consisting of first argument repeated n times. |
REVERSE |
Returns a reversed-character expression. |
RIGHT |
Returns part of the expression starting from a specific character to the right. |
RTRIM |
Returns the expression with trailing blanks removed. |
SOUNDEX |
Returns four characters code to evaluate similarity between the sounds of two expressions. |
SPACE |
Returns string comprised of the blank spaces, repeated n times. |
STR |
Returns character data of numeric data type. |
STUFF |
Deletes a specified number of characters, and inserts another set of characters at the specified point. |
SUBSTRING |
Returns part of a string, starting from a specified point and spanning a specified number of characters. |
UNICODE |
Returns a Unicode integer code for the first character in the expression. |
UPPER |
Returns a character string converted to uppercase letters. |
Brief Description |
|
---|---|
ABS |
Returns the absolute value of the expression. |
ACOS |
Returns the angle in radians for the given cosine. |
ASIN |
Returns the angle in radians for the given sine. |
ATAN |
Returns the angle in radians for the given tangent. |
ATN2 |
Returns the angle in radians whose tangent is in between two given floats. |
CEILING |
Returns the smallest integer greater than or equal to a given expression. |
COS |
Returns the cosine from a given angle (in radians). |
COT |
Returns the cotangent from a given angle (in radians). |
DEGREES |
Returns a degrees value from a given expression (in radians). |
EXP |
Returns the exponential value of the expression. |
FLOOR |
Returns the largest integer that is less than or equal to the given expression. |
LOG |
Returns the natural logarithm of a given expression. |
LOG10 |
Returns the base 10 logarithm of the given expression. |
PI |
Returns number PI (3.1415926535897931...). |
POWER |
Returns the result of an expression in power n. |
RADIANS |
Returns radians from degrees. |
RAND |
Returns the random float number in the range of 0 to 1. |
ROUND |
Returns a numeric expression rounded to a specified length or precision. |
SIGN |
Returns +1 for positive expressions, 0 for zero, and –1 for negative expressions. |
SIN |
Returns the sine from a given angle (in radians). |
SQUARE |
Returns the expression squared. |
SQRT |
Returns the square root of the given expression. |
TAN |
Returns the tangent of the given expression. |
Brief Description |
|
---|---|
DATEADD |
Returns a new datetime value based on the passed value plus a specified interval. |
DATEDIFF |
Returns number of time units (seconds, days, years, etc.) passed between two dates. |
DATENAME |
Returns character string representing a specified date part of the date. |
DATEPART |
Returns an integer representing the specified date part. |
DAY |
Returns an integer representing the day part of a date. |
GETDATE |
Returns the current system's date and time. |
GETUTCDATE |
Returns date/time value for the current UTC time. |
MONTH |
Returns an integer representing the month part of a date. |
YEAR |
Returns an integer representing the year part of a date. |
Brief Description |
|
---|---|
AVG |
Returns the average of all the group values; NULLs are ignored. |
BINARY_CHECKSUM |
Returns the binary checksum value computed over a row of a table or a list of expressions. |
CHECKSUM |
Returns the checksum value computed over a row of a table or a list of expressions. |
CHECKSUM_AGG |
Returns the checksum of values in a group. |
COUNT |
Returns the number of selected rows or input values. |
COUNT_BIG |
Returns the number of selected rows or input values. |
GROUPING |
Causes an additional column to be output with a value 1 or 0. |
MIN |
Returns the lowest input value. |
MAX |
Returns the greatest input value. |
STDEV |
Returns the statistical standard deviation for values in the expression. |
STDEVP |
Returns the statistical standard deviation for the population of the values in the expression. |
SUM |
Returns the sum of the input values. |
VAR |
Returns the statistical variance for the values in a given expression. |
VARP |
Returns the statistical variance for a population of s in the values in a given expression. |
Function Name |
Brief Description |
---|---|
PATINDEX |
Returns the starting position of a first occurrence of the specified pattern within an expression. |
TEXTPTR |
Returns the text pointer value that corresponds to a text, ntext, or image in varbinary format. |
TEXTVALID |
Returns the results from checking whether text, ntext, or image text-pointer is valid. |
Function Name |
Brief Description |
---|---|
@@CURSOR_ROWS |
Returns the number of rows in the last opened cursor. |
@@FETCH_STATUS |
Returns the status of the last FETCH statement from any cursor within the current session. |
CURSOR_STATUS |
Is a scalar function that shows whether the procedure has returned a cursor and a result set for a given parameter. |
Brief Description |
|
---|---|
COL_LENGTH |
Returns the defined length of a column. |
COL_NAME |
Returns the column name from the column ID. |
COLUMNPROPERTY |
Returns information about a column or a parameter in a procedure. |
DATABASEPROPERTY |
Returns the property value of a given database. |
DATABASEPROPERTYEX |
Returns the current setting for the specified property. |
DB_ID |
Returns database identification number. |
DB_NAME |
Returns the current database name. |
FILE_ID |
Returns the file identification number for a given logical file. |
FILE_NAME |
Returns the file name from a given identification number. |
FILEGROUP_ID |
Returns the file identification number for a given filegroup. |
FILEGROUP_NAME |
Returns the filegroup name from a given identification number. |
FILEGROUPPROPERTY |
Returns a specified filegroup property value for a given filegroup. |
FILEPROPERTY |
Returns a specified file property value for a given file. |
FULLTEXTCATALOGPROPERTY |
Returns information about full-text catalog. |
FULLTEXTSERVICEPROPERTY |
Returns information about full-text service level properties. |
INDEX_COL |
Returns indexed column name. |
INDEXKEY_PROPERTY |
Returns information about the index key. |
INDEXPROPERTY |
Returns the property value from a given index name and table ID. |
OBJECT_ID |
Returns database object's ID given name. |
OBJECT_NAME |
Returns database object's name by ID. |
OBJECTPROPERTY |
Returns information about objects in the current database. |
@@PROCID |
Returns stored procedure identifier for the current procedure. |
TYPEPROPERTY |
Returns information about data types. |
SQL_VARIANT_PROPERTY |
Returns information about the base data type in addition to other property information. |
FN_LISTEXTENDEDPROPERTY |
Returns extended property values of the database objects. |
Brief Description |
|
---|---|
@@CONNECTION |
Returns the number of opened or attempted connections. |
@@DATEFIRST |
Returns the value of the SET DATEFIRST parameter. |
@@DBTS |
Returns the current value of the datestamp data type. |
@@LANGUAGE |
Returns the name of the language for the current session/database. |
@@LANGID |
Returns ID of the language for the current session/database. |
@@LOCK_TIMEOUT |
Returns lock timeout in seconds. |
@@MAX_CONNECTION |
Returns the maximum number of simultaneous user connections. |
@@MAX_PRECISION |
Returns the precision level used by numeric data types. |
@@NESTLEVEL |
Returns the nesting level of the current stored procedure. |
@@OPTIONS |
Returns bitmask information about current SET options. |
@@REMSERVER |
Returns name of the remote server. |
@@SPID |
Returns the number (ID) of the current process/session. |
@@SERVERNAME |
Returns the name of the local server. |
@@SERVICENAME |
Returns the name of the registry key under which the SQL Server instance is running. |
@@TEXTSIZE |
Returns the current value of the TEXTSIZE option. |
@@VERSION |
Returns the date, version, and processor type for the current version of SQL Server. |
Brief Description |
|
---|---|
IS_MEMBER |
Indicates whether the user is a member of a Windows NT group or an SQL Server role. |
IS_SRVROLEMEMBER |
Indicates whether current login is a member of the specified role. |
SUSER_ID |
Returns login ID for the current user. |
SUSER_NAME |
Returns login name for the current user. |
SUSER_SID |
Returns user's security identification number (SID) from login name. |
SUSER_SNAME |
Returns user's login name from security identification number (SID). |
USER_ID |
Returns user's database identification number from user name. |
USER_NAME |
Returns database user's name from identification number. |
USER |
Returns the current user's database name. |
HAS_DBACCESS |
Indicates whether current user has access to the specified database. |
fn_trace_geteventinfo |
Returns information about events being traced. |
fn_trace_getfilterinfo |
Returns information about filters applied to a specified trace. |
fn_trace_getinfo |
Returns information about traces. |
fn_trace_gettable |
Returns trace information in a table format. |
Brief Description |
|
---|---|
APP_NAME |
Returns the application name of the current session (if set). |
CASE |
Evaluates a list of conditions and returns one value. |
CAST |
Explicitly converts one data type into another data type. |
COALESCE |
Returns the first non-Null expression on the list. |
CONVERT |
Explicitly converts one data type into another data type, behaves similar to the CAST function. |
CURRENT_TIMESTAMP |
Returns the current date/time; equivalent of GETDATE(). |
CURRENT_USER |
Returns the current user; equivalent of USER_NAME. |
DATALENGTH |
Returns the number of bytes in an expression. |
@@ERROR |
Returns the error number of the last Transact-SQL statement. |
FORMATMESSAGE |
Formats a message from the existing one in the sysmessages table. |
GETANSINULL |
Returns the default NULL ability for the database for the session. |
HOST_ID |
Returns the ID of the computer. |
HOST_NAME |
Returns the name of the host computer. |
IDENT_INCR |
Returns the increment value of any identity column in a table or a view. |
IDENT_SEED |
Returns the identity seed value of any identity column in a table or a view. |
@@IDENTITY |
Returns the last inserted identity value. |
IDENTITY |
Used to insert into an identity column. |
ISDATE |
Determines whether an expression is a valid date type (or could be converted into one). |
ISNULL |
Determines whether the expression is NULL. |
ISNUMERIC |
Determines whether the expression is numeric. |
NEWID |
Returns a unique value for the UNIQUEIDENTIFIER data type. |
NULLIF |
Returns NULL if two expressions are equivalent. |
PARSENAME |
Returns the specified path of the object name. |
PERMISSIONS |
Returns a value for the bitmap specifying permissions for the object for the current user. |
@@ROWCOUNT |
Returns the number of rows affected by the last statement. |
ROWCOUNT_BIG |
Returns the rows affected by the last statement (bigint). |
SESSION_USER |
Returns the user's name that is to be inserted into a table when no default is specified. |
STATS_DATE |
Returns the date when the index statistics were updated. |
SYSTEM_USER |
Returns the name of the current user with admin privileges (Windows authenticated). |
@@TRANCOUNT |
Returns the number of pending transactions for the current session. |
Function Name |
Brief Description |
USER_NAME |
Returns the database user name from a given identification number. |
COLLATIONPROPERTY |
Returns the property of a given collation. |
SCOPE_IDENTITY |
Returns the last identity value inserted in the identity column for the current scope. |
SERVERPROPERTY |
Returns the value for the specified server property. |
SESSIONPROPERTY |
Returns the value for the specified session property. |
fn_helpcollation |
Returns a list of all collation supported. |
fn_servershareddrives |
Returns the names of the shared drives that could be used by the clustered server. |
fn_virtualservernodes |
Returns a list of nodes on which a virtual server can run. |
Function Name |
Brief Description |
---|---|
@@CPU_BUSY |
Returns the time (in milliseconds) since the start of the SQL Server. |
@@IDLE |
Returns idle time (in milliseconds) since the start of the SQL Server. |
@@IO_BUSY |
Returns the time (in milliseconds) since the start of the SQL Server, when it was busy with I/O operations. |
@@PACK_RECEIVED |
Returns the number of input packets received since the start of the SQL Server. |
@@PACK_SENT |
Returns the number of output packets received since the start of the SQL Server. |
@@PACKET_ERRORS |
Returns the number of error packets on the network that have occurred since the start of the SQL Server. |
@@TIMETICKS |
Returns the number of milliseconds per CPU tick. |
@@TOTAL_ERRORS |
Returns the number of disk write/read errors since the start of the SQL Server. |
@@TOTAL_READ |
Returns the number of physical disk reads since the start of the SQL Server. |
@@TOTAL_WRITE |
Returns the number of physical disk writes since the start of the SQL Server. |
fn_virtualfilestats |
Returns I/O statistics for the database files. |
Brief Description |
|
---|---|
CONTAINSTABLE |
Returns a table for those columns containing character-based data types for precise or fuzzy matches of a single word or phrase. |
FREETEXTTABLE |
Returns a table for those columns containing character-based data types for values that match the meaning but not the exact word. |
OPENQUERY |
Executes a specified pass-through query on a linked OLEDB data source. |
OPENROWSET |
Provides an ad-hoc method of connecting and accessing remote data through OLEDB. |
OPENDATASOURCE |
Provides ad-hoc connection information, as a part of a four-part object name, without using a linked server. |
OPENXML |
Provides a rowset view of the XML document. |