Declare a varchar variable
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 DATALENGTH(@Value) 7> GO ----------- 3 (1 rows affected) 1>