bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server SQUARE() Function

Concept visual

SQL Server SQUARE() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the square of a number:

SELECT SQUARE(64);

Definition and Usage

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

Syntax

Square(

number )

Parameter Values

Parameter

Description number

Required. A positive number to calculate the square of

Technical Details

Works in:

SQL Server (starting with 2008), Azure SQL Data Warehouse, Parallel Data

Warehouse

More Examples

Example

Return the square of a number:

SELECT SQUARE(13);

Previous

❮ SQL Server Functions

Next

Previous

SQL Server SQRT() Function

Next

SQL Server SUM() Function