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

Sgn

Example

Returns the sign of a number.

SELECT Sgn(243.5AS SgnNum;

Definition and Usage

The Sgn() function returns the sign of a number, with the following outcomes:

  • If the number > 0, it returns 1
  • If the number = 0, it returns 0
  • If the number < 0, it returns -1

Syntax

Sgn(number)

Parameter Values

Parameter

Description

number

Specify the number for which the sign should be returned.

Technical Details

WORKS IN

From Access 2000