LEN (Binary String) (TSQL Function)

Returns the length of a binary string, in bytes.

Syntax

LEN ( binary_string_expression )

Arguments

binary_string_expression
is a binary string expression of type varbinary.

Return Types

Returns int.

Examples

PRINT LEN(0x);
PRINT LEN(0x11223344556677889900);

The result is:

0
10
RSQL, a simple alternative to Microsoft SQL Server