DATALENGTH(): returns the number of bytes used to manage a value : DATALENGTH « String Functions « SQL Server / T-SQL






DATALENGTH(): returns the number of bytes used to manage a value


1> -- DATALENGTH(): returns the number of bytes used to manage a value.
2>
3> DECLARE @Value VarChar(20)
4> SET @Value = 'abc'
5>
6> SELECT LEN(@Value)
7> GO

-----------
          3

(1 rows affected)
1>
           
       








Related examples in the same category

1.DATALENGTH(@Value)
2.DATALENGTH() for for Unicode character set