How to find out the size of data type in sql. For example if i have declared a variable or column as
declare @test varchar(255)
Then i nee
You can use sql_variant_property.
declare @test varchar(255) set @test = '' --Must assign a value select sql_variant_property(@test, 'MaxLength')