Skip to main content

DATALENGTH

A function that returns the number of characters in an expression.

Synopsis

DATALENGTH(expression)

Arguments

Argument Description
expression An expression, which can be the name of a column, a string literal, or the result of another scalar function. The underlying data type can be a character type (such as CHAR or VARCHAR), a numeric, or a data stream.

Description

Note:

The DATALENGTH, CHAR_LENGTH, and CHARACTER_LENGTH functions are identical. Use of the CHAR_LENGTH function is recommended for new code. DATALENGTH is provided for TSQL compatibility. Refer to CHAR_LENGTH for further details.

See Also

Purpose of this instance: Draft documentation
DocReleaseID: Core2018.1.11
Content loaded from:
/staging/ce/2018.1.11/doc/cache/en-us/src/
/staging/ce/2018.1.11/doc/ensemble/en-us/src/
/staging/ce/2018.1.11/doc/isp/en-us/src/
/staging/learning/zenmojo-doc/en-us/src/
FeedbackOpens in a new tab