SIGN() Examples in SQL Server

In SQL Server, the T-SQL SIGN() function returns the sign of a number. In other words, it indicates whether or not the value is a positive number, a negative number, or zero.

You provide the number as an argument when calling the function.

The function returns the following result, depending on whether the argument is positive, negative, or zero.

  • 1 if the number is positive
  • -1 if the number is negative
  • 0 if the number is zero

Read more

POWER() Examples in SQL Server

In SQL Server, the T-SQL POWER() function is a mathematical function that returns the value of the specified expression to the specified power.

The function accepts two arguments; the first specifies the expression, the second specifies the power with which to raise that expression.

The return value is the same data type as the first argument.

Read more