SQL SERVER 内置函数 (Transact-SQL)

SQL Server provides many built-in functions and also lets you create user-defined functions. The categories of built-in functions are listed on this page.

Function

Description

Rowset Functions

Return an object that can be used like table references in an SQL statement.

Aggregate Functions

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

Ranking Functions

Return a ranking value for each row in a partition.

Scalar Functions (Described below)

Operate on a single value and then return a single value. Scalar functions can be used wherever an expression is valid.

Function category

Description

Configuration Functions

Return information about the current configuration.

Conversion Functions

Support data type casting and converting.

Cursor Functions

Return information about cursors.

Date and Time Data Types and Functions

Perform operations on a date and time input values and return string, numeric, or date and time values.

Logical Functions

Perform logical operations.

Mathematical Functions

Perform calculations based on input values provided as parameters to the functions, and return numeric values.

Metadata Functions

Return information about the database and database objects.

Security Functions

Return information about users and roles.

String Functions

Perform operations on a string (char or varchar) input value and return a string or numeric value.

System Functions

Perform operations and return information about values, objects, and settings in an instance of SQL Server.

System Statistical Functions

Return statistical information about the system.

Text and Image Functions

Perform operations on text or image input values or columns, and return information about the value.

SQL Server built-in functions are either deterministic or nondeterministic. Functions are deterministic when they always return the same result any time they are called by using a specific set of input values. Functions are nondeterministic when they could return different results every time they are called, even with the same specific set of input values. For more information, see 确定性函数和不确定性函数  

Functions that take a character string input and return a character string output use the collation of the input string for the output.

Functions that take non-character inputs and return a character string use the default collation of the current database for the output.

Functions that take multiple character string inputs and return a character string use the rules of collation precedence to set the collation of the output string. For more information, see 排序规则优先级 (Transact-SQL).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值