Tuesday, October 26, 2010

Difference between Varchar(MAX) and TEXT Datatype in Sql Server

The TEXT data type is used to store large amount of text data like text file contents.
The VARCHAR is suitable used for small quantity of data.

In previous versions of Sql Server we need to use READTEXT and WRITETEXT functions to operate on TEXT
datatypes. Now TEXT data types can be dealt like a normal data type using standard DML queries.

The scenarios where TEXT could be advisable is while storing resume contents, html contents etc.
VARCHAR is useful when we are sure the maximum data won't exceed a particular number.

No comments:

Post a Comment