Mega Code Archive
The DATALENGTH() function returns the number of bytes used to manage a value
3>
4> DECLARE @Value VarChar(20)
5> SET @Value = 'abc'
6> SELECT DATALENGTH(@Value)
7> SELECT LEN(@Value)
8> GO
-----------
3
(1 rows affected)
-----------
3
(1 rows affected)