MySQL COS Function

Example

Return the cosine of a number:

SELECT COS(2);

Definition and Usage

The COS() function returns the cosine of a number. Continue reading MySQL COS Function

MySQL CEILING Function

Example

Return the smallest integer value that is greater than or equal to 25.75:

SELECT CEILING(25.75);

Definition and Usage

The CEILING() function returns the smallest integer value that is bigger than or equal to a number.

Note: This function is equal to the CEIL() function. Continue reading MySQL CEILING Function

MySQL CEIL Function

Example

Return the smallest integer value that is greater than or equal to 25.75:

SELECT CEIL(25.75);

Definition and Usage

The CEIL() function returns the smallest integer value that is bigger than or equal to a number.

Note: This function is equal to the CEILING() function. Continue reading MySQL CEIL Function

MySQL AVG Function

Example

Return the average value for the “Price” column in the “Products” table:

SELECT AVG(Price) AS AveragePrice FROM Products;

Definition and Usage

The AVG() function returns the average value of an expression.

Note: NULL values are ignored. Continue reading MySQL AVG Function

MySQL ATAN2 Function

Example

Return the arc tangent of two values:

SELECT ATAN2(0.50, 1);

Definition and Usage

The ATAN2() function returns the arc tangent of two numbers.

Syntax

ATAN2(a, b)

Continue reading MySQL ATAN2 Function

MySQL ATAN Function

Example

Return the arc tangent of a number:

SELECT ATAN(2.5);

Definition and Usage

The ATAN() function returns the arc tangent of one or two numbers. Continue reading MySQL ATAN Function

MySQL ASIN Function

Example

Return the arc sine of a number:

SELECT ASIN(0.25);

Definition and Usage

The ASIN() function returns the arc sine of a number.

The specified number must be between -1 to 1, otherwise this function returns NULL. Continue reading MySQL ASIN Function

MySQL ACOS Function

Example

Return the arc cosine of a number:

SELECT ACOS(0.25);

Definition and Usage

The ACOS() function returns the arc cosine of a number.

The specified number must be between -1 to 1, otherwise this function returns NULL. Continue reading MySQL ACOS Function

MySQL ABS Function

Example

Return the absolute value of a number:

SELECT ABS(-243.5);

Definition and Usage

The ABS() function returns the absolute (positive) value of a number.

Syntax

ABS(number)

Continue reading MySQL ABS Function

MySQL UPPER Function

Example

Convert the text to upper-case:

SELECT UPPER("SQL Tutorial is FUN!");

Definition and Usage

The UPPER() function converts a string to upper-case.

Note: This function is equal to the UCASE() function. Continue reading MySQL UPPER Function