THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL SQRT() Function

❮ MySQL Functions

Example

Return the square of a number:

SELECT SQRT(64);
Try it Yourself »

Definition and Usage

The SQRT() function returns the square of a number.

Syntax

SQRT(number)

Parameter Values

Parameter Description
number Required. A number to calculate the square of. Must be greater than 0

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Return the square of a number:

SELECT SQRT(13);
Try it Yourself »

❮ MySQL Functions