Current location - Training Enrollment Network - Mathematics courses - Find all the functions of SQL! Complete plus 100 points!
Find all the functions of SQL! Complete plus 100 points!
I. Aggregation function

AVG returns the average of the values in the group. Null values will be ignored.

BINARY_CHECKSUM returns the binary check value calculated on the row or expression list in the table. BINARY_CHECKSUM can be used to detect changes in rows in a table.

CHECKSUM returns the check value calculated on the row or expression list in the table. Checksums are used to generate hash indexes.

CHECKSUM_AGG returns the check value of the values in the group. Null values will be ignored.

COUNT returns the number of items in the group.

COUNT_BIG returns the number of items in the group. The usage of COUNT_BIG is similar to the COUNT function. The only difference between them is the return value: COUNT_BIG always returns the bigint data type value, while COUNT always returns the int data type value.

GROUPING is an aggregate function that generates an additional column. When adding a row using the CUBE or ROLLUP operator, the output value of the additional column is 1, and when the added row is not generated by the CUBE or ROLLUP, the output value of the additional column is 0.

Grouping is only allowed in a select list associated with a GROUP BY clause that contains a cube or a ROLLUP operator.

MAX returns the maximum value of the expression

MIN Returns the minimum value of an expression.

SUM returns the sum of all the values in the expression, or only non-repeating values. SUM can only be used for numeric columns. Null values will be ignored.

STDEV returns the statistical standard deviation of all values in a given expression.

STDEVP returns the statistical standard deviation of all values in a given expression.

VAR returns the statistical variance of all values in a given expression.

VARP returns the statistical variance of padding for all values in a given expression.

Two. mathematical function

ABS returns the absolute value of a given numerical expression.

ACOS returns an angle value expressed in radians, and the cosine of the angle value is a given floating-point expression; This function is also called the anti-cosine function.

ASIN returns an angle value expressed in radians, and the sine of the angle value is a given floating-point expression; Also known as arcsine

ATAN returns an angle value expressed in radians, and its tangent value is a given floating-point expression; Also known as arc tangent

ATN2 returns an angle value in radians, and its tangent value is between two given floating-point expressions. Also known as arc tangent

CEILING returns the smallest integer greater than or equal to the given numerical expression.

COS is a mathematical function that returns the trigonometric cosine of a given angle (in radians) in a given expression.

COT is a mathematical function that returns the trigonometric cotangent of the specified angle (in radians) in a given floating-point expression.

Given an angle in radians, the corresponding angle (in degrees) is returned.

EXP returns the exponential value of a given floating-point expression.

FLOOR returns the largest integer less than or equal to the given numerical expression.

LOG returns the natural logarithm of a given floating-point expression.

LOG 10 returns the base 10 logarithm of a given floating-point expression.

PI returns the constant value of PI.

POWER returns the value of the given expression multiplied by the specified power.

RADIANS returns the radians of the degrees entered in a numeric expression.

RAND returns a random floating-point value between 0 and 1.

ROUND returns a numeric expression rounded to a specified length or precision.

SIGN returns the plus sign (+1), zero (0) or minus sign (-1) of the given expression.

SIN returns the trigonometric sine of a given angle (in radians) as a floating-point expression.

SQUARE returns the square of the given expression.

SQRT returns the square root of a given expression.

TAN returns the tangent of the input expression.

Three. Date function

DATEADD returns a new datetime value based on adding a period of time to the specified date.

DATEDIFF returns the number of date and time boundaries that span two specified dates.

DATENAME returns a string representing the specified date part of the specified date.

DATEPART returns an integer representing the specified date part of the specified date.

DAY returns an integer representing the date part of the specified date.

Get Microsoft by date and time value? 0? 3 SQL Server? 6? 4 standard internal format returns the current system date and time.

GETUTCDATE returns a datetime value representing the current UTC time (Universal Time Coordinates or Greenwich Mean Time).

MONTH returns an integer representing the specified date and month.

YEAR returns an integer representing the year in the specified date.

Four. System function

APP_NAME returns the application name of the current session (if an application is set).

CASE expression calculates the condition list and returns one of several possible result expressions (see PPT data for details).

CAST and CONVERT explicitly convert expressions of one data type to another (see PPT materials for details).

COALESCE returns the first non-empty expression in its parameter.

COLLATIONPROPERTY returns the properties of the given collation.

CURRENT_TIMESTAMP returns the current date and time. Equivalent to GETDATE ()

Current User Returns the current user. The price is higher than the user name ()