- (subtraction)

The subtraction operator (-) returns the result of subtracting the second argument from the first.

Syntax

X-Y

Input

Argument Type Description
X any numeric type A scalar expression or column expression
Y any numeric type A scalar expression or column expression

Return Value

Returns a numerical value corresponding to the result of subtracting Y from X.

The data type of the result depends on the data type of the arguments.
  • If either X or Y are decimal, the result is decimal.
  • If one argument is big integer and the other is integer, the result is big integer.
  • If both X and Y are integers, the result is integer.

If X and/or Y is N/A, the result is N/A.