Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - SQL Reference » Using SQL » SQL functions » SQL functions (A-D)

 

BYTE_LENGTH function [String]

Returns the number of bytes in a string.

Syntax
BYTE_LENGTH( string-expression )
Parameters
  • string-expression   The string whose length is to be calculated.

Returns

INT

Remarks

Trailing white space characters in the string-expression are included in the length returned.

The return value of a NULL string is NULL.

If the string is in a multibyte character set, the BYTE_LENGTH value may differ from the number of characters returned by CHAR_LENGTH.

This function supports NCHAR inputs and/or outputs.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 12.

SELECT BYTE_LENGTH( 'Test Message' );