Open In App

Sgn() and Sqr() function in MS Access

Last Updated : 02 Sep, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

1. Sgn() Function :
sgn() function returns sign of a number.if the number is positive then it returns 1 if number is equal to 0 then it returns 0 otherwise if number is less than 0 then it return -1.

Syntax :

Sgn(number)

Example-1 :

SELECT Sgn(93.5) AS SgnNum;

Output –

SgnNum
1

Example-2 :

SELECT Sgn(-93.5) AS SgnNum;

Output –

SgnNum
-1



2. Sqr() Function :
Sqr() function returns the square root of a number. In this function, a number will be passed as a parameter and it will return the square root of that number.Number must be positive.

Syntax :

Sqr(number)

Example-1

SELECT Sqr(100) AS SqrNum;

Output-

SqrNum
10

Example-2

SELECT Sqr(169) AS SqrNum;

Output –

SqrNum
13

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads