SQL Server variable size and increase it
When you define a maximum size explicitly, then you cannot define higher than CHAR(8000)
/ VARCHAR(8000)
or NCHAR(4000)
/ NVARCHAR(4000)
.
When you define a variable as CHAR(max)
or VARCHAR(max)
, you set the maximum size of that variable to 2GB
.
There is no way to define a variable with a maximum size between 8000 bytes
and 2GB
.