4 Data Types to be Deprecated in SQL Server

As of SQL Server 2017 (and SQL Server 2019 preview), four data types are flagged for deprecation in a future version of SQL Server.

They are:

  • timestamp
  • text
  • ntext
  • image

Microsoft advises that these data types are currently in maintenance mode and they will be removed in a future version of SQL Server. This means you should avoid using these data types in new development work, and you should plan to modify applications that currently use them.

What to Replace these With?

The following table shows you what each of these data types should be replaced with.

Data Type (to be deprecated) Replace With…
timestamp rowversion
text varchar(max)
ntext nvarchar(max)
image varbinary(max)

Reference

Microsoft’s documentation for ntext, text, and image specifically states the following:

IMPORTANT! ntext, text, and image data types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

Microsoft’s documentation for timestamp and rowversion states the following:

The timestamp syntax is deprecated. This feature is in maintenance mode and may be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Microsoft also maintains a list of deprecated features at Deprecated Database Engine Features in SQL Server 2016 and Deprecated Database Engine Features in SQL Server 2017. Both articles list these data types under the heading “Features deprecated in a future version of SQL Server”. It also explains that the data types are:

…supported in the next version of SQL Server, but will be deprecated in a later version. The specific version of SQL Server has not been determined.