Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

SQUARE

Example

Calculate and return the result of multiplying a number by itself (squared).

SELECT SQUARE(64);

Definition and Usage

The SQUARE() function calculates and returns the result of multiplying a number by itself (squaring the number).

Syntax

SQUARE(number)

Parameter Values

Parameter

Description

number

Required: A positive numeric value to compute its square.

Technical Details

Works in:

SQL Server (beginning from 2008), Azure SQL Data Warehouse, Parallel Data Warehouse

More Examples

Example

Calculate and provide the square of a given number.

SELECT SQUARE(13);