Sgn() and Sqr() function in MS Access
Last Updated :
02 Sep, 2020
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 –
Example-2 :
SELECT Sgn(-93.5) AS SgnNum;
Output –
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-
Example-2
SELECT Sqr(169) AS SqrNum;
Output –
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...