How to find out the size of data in sql. For example, if I declared a variable or column as
declare @test varchar(255)
Then I need the size of the @test datatype variable to display as 255.
EDIT: Now I know how to get it for a column, is there a way for a variable?