How many characters can a SQL Server 2008 database field contain when the data type is VARCHAR(MAX)?
This question is related to
sql-server-2008
size
varchar
See the MSDN reference table for maximum numbers/sizes.
Bytes per varchar(max), varbinary(max), xml, text, or image column: 2^31-1
There's a two-byte overhead for the column, so the actual data is 2^31-3 max bytes in length. Assuming you're using a single-byte character encoding, that's 2^31-3 characters total. (If you're using a character encoding that uses more than one byte per character, divide by the total number of bytes per character. If you're using a variable-length character encoding, all bets are off.)
For future readers who need this answer quickly:
2^31-1 = 2.147.483.647 characters
Source: Stackoverflow.com