== Why is this an issue?

Deprecated language features are those that have been retained temporarily for backward compatibility, but which will eventually be removed from the language. In effect, deprecation announces a grace period to allow the smooth transition from the old features to the new ones. In that period, no use of the deprecated features should be added to the code, and all existing uses should be gradually removed.


The following features are deprecated or (depending on your version) already removed from TSQL:

[frame=all]
[cols="^1,^1"]
|===
|Instead of|Use

|``++WRITETEXT++``, ``++UPDATETEXT++``, ``++READTEXT++``|``++VARCHAR++``
|``++GROUP BY ALL++``|``++UNION++`` or a derived table
|``++FASTFIRSTROW++``|``++FAST n++``
|``++SETUSER++``|``++EXECUTE AS++``
|``++CREATE RULE++``|``++CHECK++`` constraints
|``++PASSWORD++``, ``++MEDIAPASSWORD++`` in ``++BACKUP++`` or ``++RESTORE++``|use access control on the directory or ``++WITH RESTRICTED_USER++`` for ``++RESTORE++``
|``++DBCC DBREINDEX++``|``++ALTER INDEX REBUILD++``
|``++DBCC INDEXDEFRAG++``|``++ALTER INDEX DEFRAG++``
|``++DBCC SHOWCONTIG++``|``++sys.dm_db_index_physical_stats++``
|DBCC CONCURRENCYVIOLATION|no replacement
|``++SET ROWCOUNT++``|``++TOP(n)++``
|``++SET REMOTE_PROC_TRANSACTIONS++``|distributed queries that reference linked servers (``++sp_addlinkedserver++``)
|``++RAISERROR @Errno @ErrMsg++``|the ``++RAISERROR++`` syntax using parentheses
|DROP INDEX with two-part name|Move table (and database) to an ``++ON++`` clause
|String literals as column aliases|Remove the quotes around the alias. Use square brackets if escaping is necessary
|Numbered procedures|Replace with un-numbered procedures
|System stored procedure|no replacement
|``++fn_virtualservernodes++``|``++sys.dm_os_cluster_nodes++``
|``++fn_servershareddrives++``|``++sys.dm_io_cluster_shared_drives++``
|``++GRANT / DENY / REVOKE ALL++``|List the specific permissions 
|``++TORN_PAGE_DETECTION++``|checksum
|``++TAPE++``|``++DISK++`` or ``++URL++``
|Table hint without ``++WITH++``|``++WITH(hint)++``
|===

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Remove this use of xxx.


=== Highlighting

the deprecated usage


'''
== Comments And Links
(visible only on this page)

=== on 21 Jul 2017, 16:42:08 Pierre-Yves Nicolas wrote:
SQL Server 2016: \https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016

SQL Server 2008: \https://msdn.microsoft.com/en-us/library/ms143729(SQL.100).aspx

=== on 21 Jul 2017, 17:40:41 Pierre-Yves Nicolas wrote:
``++SET ROWCOUNT++`` is not deprecated in all cases. https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016[What's deprecated] is:

____SET ROWCOUNT for INSERT, UPDATE, and DELETE statements____

=== on 28 Jul 2017, 17:34:03 Alban Auzeill wrote:
|``++SET ANSI_NULLS/ANSI_PADDING/CONCAT_NULL_YIELDS_NULL++`` |moved to [RSPEC-4154]|

|Three-part and four-part column references|moved to [RSPEC-4149]|

|System table, view|moved to [RSPEC-4155]|

endif::env-github,rspecator-view[]
