| (logical or)

The logical or operator (|) returns true if either argument is true.

Syntax

X|Y

Input

Argument Type Description
X
  • integer
  • big integer
A scalar expression or column expression that evaluates to 0 or 1
Y
  • integer
  • big integer
A scalar expression or column expression that evaluates to 0 or 1

Return Value

Returns a boolean value of 1 or 0 corresponding to the logical disjunction of X and Y.

If either X or Y are 1, the result is 1. If both X and Y are 0, the result is 0.

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

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