T Sql 简明教程

T-SQL - Functions

MS SQL Server 有许多内置函数用于对字符串或数字数据执行处理。以下是所有有用的 SQL 内置函数的列表:

MS SQL Server has many built-in functions to perform processing on string or numeric data. Following is the list of all useful SQL built-in functions −

  1. SQL Server COUNT Function − The SQL Server COUNT aggregate function is used to count the number of rows in a database table.

  2. SQL Server MAX Function − The SQL Server MAX aggregate function allows to select the highest (maximum) value for a certain column.

  3. SQL Server MIN Function − The SQL Server MIN aggregate function allows to select the lowest (minimum) value for a certain column.

  4. SQL Server AVG Function − The SQL Server AVG aggregate function selects the average value for certain table column.

  5. SQL Server SUM Function − The SQL Server SUM aggregate function allows selecting the total for a numeric column.

  6. SQL Server SQRT Function − This is used to generate a square root of a given number.

  7. SQL Server RAND Function − This is used to generate a random number using SQL command.

  8. SQL Server CONCAT Function − This is used to concatenate multiple parameters to a single parameter.

  9. SQL Server Numeric Functions − Complete list of SQL functions required to manipulate numbers in SQL.

  10. SQL Server String Functions − Complete list of SQL functions required to manipulate strings in SQL.