Home

Deprecated system tables and views should not be used

Description

    The rule "Deprecated system tables and views should not be used" states that any system tables or views that have been marked as deprecated, or are no longer supported, should not be used by developers when writing SQL Server code. This rule is important because deprecated system tables and views can contain outdated or inaccurate data, and using them in code can lead to unexpected results or errors. Additionally, using deprecated system tables and views can also cause performance issues if the code is not optimized properly.

Key Benefits

  • Improved Performance: By avoiding the use of deprecated system tables and views, queries and applications can run faster and more efficiently.
  • Reduced Risk: By avoiding the use of deprecated system tables and views, the risk of encountering errors or unexpected results is reduced.
  • Increased Reliability: By avoiding the use of deprecated system tables and views, the reliability of applications is increased.

 

Non-compliant Code Example

Create Procedure TestProc3
As
BEGIN
    SELECT col.name columnName
    FROM syscolumns   --Non compliant code
    WHERE col.name like '%name' 
END;
GO
Visual Expert 2025
 VETSQLRULE24