Skip to content

Columns of data type Text or nText

MichelleTaylorRG edited this page Jun 19, 2019 · 2 revisions

From http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/don-t-use-text-datatype-for-sql-2005-and:

With SQL Server versions prior to SQL2005, the only way to store large amounts of data was to use the text, ntext, or image data types. SQL2005 introduced new data types that replace these data type, while also allowing all of the useful string handling functions to work. Changing the data types to the new SQL2005+ equivalent should be relatively simple and quick to implement (depending on the size of your tables). So, why wait? Convert the data types now.

How to correct it: Change the data type to a SQL2005+ version. Text should be converted to varchar(max), ntext should be converted to nvarchar(max) and image should be converted to varbinary(max).

Clone this wiki locally