BIN_SHR()
Bitwise right-shift with sign extension
BIGINT
or INT128
depending on the first argument
BIN_SHR (number, shift)
Parameter | Description |
---|---|
number |
A number of an integer type |
shift |
The number of bits the number value is shifted by |
Returns the first argument bitwise right-shifted by the second argument, i.e. a >> b
or a/2b
.
The operation performed is an arithmetic right shift (x86 SAR), meaning that the sign of the first operand is always preserved.