Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 870 Bytes

SRD0050.md

File metadata and controls

45 lines (33 loc) · 870 Bytes

SQL Server Rule: SRD0050

Assembly SqlServer.Rules.dll
Namespace SqlServer.Rules.Design
Class AvoidStaticPredicateCompareRule

Rule Information

Id SRD0050
Friendly Name Expression reducible to constaint
Category Design
Ignorable true
Applicable Types Procedure
Scalar Function
Table Valued Function
View

Description

The comparison expression always evaluates to TRUE or FALSE.

Summary

The comparison expression always evaluates to TRUE or FALSE

Examples

Catches:

FROM a
JOIN b ON a.id = b.a_id AND 4 < 3 + 2 

equivalent to

FROM a
JOIN b ON a.id = b.a_id /* true */