The max Specifier

In SQL Server 2000, the most data that could be stored in a varchar, nvarchar, or varbinary column was 8,000 bytes. If you needed to store a larger value in a single column, you had to use the large object (LOB) data types: text, ntext, or image. The main disadvantage of using the LOB data types is that they cannot be used in many places where varchar or varbinary data types can be used (for example, as local variables, as arguments to SQL Server string manipulation functions such as REPLACE, and in string concatenation operations).

SQL Server 2005 introduced the max specifier for varchar and varbinary data types. This specifier expands the storage capabilities of the varchar and varbinary data types to store up to 231-1

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.