docs.intersystems.com
Home  /  Application Development: Core Topics  /  InterSystems SQL Reference  /  SQL Functions  /  DATALENGTH


InterSystems SQL Reference
DATALENGTH
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


A function that returns the number of characters in an expression.
Synopsis
DATALENGTH(expression)
Arguments
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.
DATALENGTH returns the INTEGER data type.
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