DATALENGTH function
Syntax
DATALENGTH( expr )
Description
Returns the number of bytes used to represent any expression. DATALENGTH is especially useful with VARCHAR, VARBINARY, LVARCHAR and LVARBINARY data types because these data types can store variable-length data.
Arguments
Example
SELECT DATALENGTH(tbl) FROM systables WHERE tbl='systables';
DATALENGTH(TBL)
--
9