- Categories:
String & binary functions (General)
BIT_LENGTH¶
Returns the length of a string or binary value in bits.
Snowflake doesn’t use fractional bytes so length is always calculated as 8 * OCTET_LENGTH.
Syntax¶
Arguments¶
string_or_binaryThe string or binary value for which the length is returned.
Examples¶
This shows use of the BIT_LENGTH function on both string and BINARY values:
Query the data: