MS Access Sgn() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MS Access Sgn() Function

❮ MS Access Functions

Example

Return the sign of a number:

SELECT Sgn(243.5) AS SgnNum;
Try it Yourself »

Definition and Usage

The Sgn() function returns the sign of a number.

This function will return one of the following:

  • If number is greater than zero, it returns 1
  • If number is equal to zero, it returns 0
  • If number is less than zero, it returns -1

Syntax

Sgn(number)

Parameter Values

Parameter Description
number Required. The number to return the sign for

Technical Details

Works in: Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000

❮ MS Access Functions