Академический Документы
Профессиональный Документы
Культура Документы
Function category Configuration Functions Cursor Functions Date and Time Functions Mathematical Functions Metadata Functions Security Functions String Functions System Functions System Statistical Functions Text and Image Functions Explanation Returns information about the current configuration. Returns information about cursors. Performs an operation on a date and time input value and returns either a string, numeric, or date and time value. Performs a calculation based on input values provided as parameters to the function, and returns a numeric value. Returns information about the database and database objects. Returns information about users and roles. Performs an operation on a string (char or varchar) input value and returns a string or numeric value. Performs operations and returns information about values, objects, and settings in Microsoft SQL Server. Returns statistical information about the system. Performs an operation on a text or image input values or column, and returns information about the value.
1. Configuration Functions
2. Cursor Functions
These scalar functions return information about cursors. @@CURSOR_ROWS CURSOR_STATUS @@FETCH_STATUS
Function DATEADD
Determinism Deterministic
Deterministic Nondeterministic Deterministic except when used as DATEPART (dw, date). dw, the weekday datepart, depends on the value set by SET DATEFIRST, which sets the first day of the week. Deterministic Nondeterministic Nondeterministic Deterministic Deterministic
4. Mathematical Functions
These scalar functions perform a calculation, usually based on input values provided as arguments, and return a numeric value.
5. Metadata Functions
COL_LENGTH COL_NAME COLUMNPROPERTY DATABASEPROPERTY
These scalar functions return information about the database and database objects.
fn_listextendedproperty FULLTEXTCATALOGPROPERTY FULLTEXTSERVICEPROPERTY INDEX_COL INDEXKEY_PROPERTY INDEXPROPERTY OBJECT_ID OBJECT_NAME OBJECTPROPERTY @@PROCID SQL_VARIANT_PROPERTY TYPEPROPERTY
DATABASEPROPERTYEX DB_ID DB_NAME FILE_ID FILE_NAME FILEGROUP_ID FILEGROUP_NAME FILEGROUPPROPERTY FILEPROPERTY 6. Security Functions
fn_trace_geteventinfo
IS_SRVROLEMEMBER
These scalar functions perform an operation on a string input value and return a string or numeric value.
ASCII CHAR CHARINDEX DIFFERENCE LEFT LEN LOWER LTRIM 8. System Functions
These scalar functions perform operations on and return information about values, objects, and settings in Microsoft SQL Server. This table lists the system functions and their determinism property. For more information about function determinism, see Deterministic and Nondeterministic Functions.
Function APP_NAME CASE expression CAST and CONVERT COALESCE COLLATIONPROPERTY CURRENT_TIMESTAMP CURRENT_USER DATALENGTH @@ERROR fn_helpcollations fn_servershareddrives fn_virtualfilestats FORMATMESSAGE GETANSINULL HOST_ID HOST_NAME IDENT_CURRENT
Determinism Nondeterministic Deterministic Deterministic unless used with datetime, smalldatetime, or sql_variant. Deterministic Nondeterministic Nondeterministic Nondeterministic Deterministic Nondeterministic Deterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic
Nondeterministic Nondeterministic Nondeterministic Nondeterministic Deterministic only if used with the CONVERT function, the CONVERT style parameter is specified and the style parameter is not equal to 0, 100, 9, or 109. Styles 0 and 100 use the default format mon dd yyyy hh:miAM (or PM). Styles 9 and 109 use the default format plus milliseconds mon dd yyyy hh:mi:ss:mmmAM (or PM). Deterministic Deterministic Nondeterministic Deterministic Deterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic Nondeterministic
ISNULL ISNUMERIC NEWID NULLIF PARSENAME PERMISSIONS @@ROWCOUNT ROWCOUNT_BIG SCOPE_IDENTITY SERVERPROPERTY SESSIONPROPERTY SESSION_USER STATS_DATE SYSTEM_USER @@TRANCOUNT USER_NAME 9. System Statistical Functions