What is the Difference Between VARCHAR and VARCHAR(MAX) Datatypes in SQL Server ?

VARCHAR stores variable-length character data whose range varies up to 8000 bytes; varchar(MAX) stores variable-length character data whose range may vary beyond 8000 bytes and till 2 GB. TEXT datatype and "Text in row" table option will be deprecated in future versions, and the usage of VARCHAR(MAX) is strongly recommended instead of TEXT datatypes.

VARCHAR(MAX) Datatypes can be used inside triggers and unlike Text, datatype can be used with normal string functions (LEN, Substring, Concatenation, as Local variables etc).



You May Interest

What is a ROLLUP Clause in SQL Server ?

Using MS SQL WHERE

What are the System Data Collection Sets Predefined Inside SQL Se ...

MS SQL Show Only Date of Current Time

List of Table Columns Used in Any View in MS SQL