16.20 - Description - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2020-03-25
dita:mapPath
xzf1512079057909.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
kby1472250656485
IF... THEN the function...
num_bits_arg is equal to zero returns target_arg unchanged.
num_bits_arg is negative rotates the bits to the right instead of the left.
target_arg and/or num_bits_arg are NULL returns NULL.
num_bits_arg is larger than the size of target_arg rotates (num_bits_arg MOD sizeof(target_arg)) bits.

The scope of the rotation operation is bounded by the size of the target_arg expression.

When operating against an integer value (BYTEINT, SMALLINT, INTEGER, or BIGINT), rotating a bit into the most significant position will result in the integer becoming negative. This is because all integers in Teradata Database are signed integers.