Description

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

COUNTSET takes the target_arg input expression and counts the number of bits within the expression that are either set to 1 or set to 0, depending on the value of target_value_arg.

The target_value_arg parameter only accepts a value of 0 or 1. If a value for target_value_arg is not specified, the default value of 1 is used, and COUNTSET counts the bit values that are set to 1.

If any of the input arguments is NULL, the function returns NULL.