Assembly | SqlServer.Rules.dll |
Namespace | SqlServer.Rules.Design |
Class | AvoidStaticPredicateCompareRule |
Id | SRD0050 |
Friendly Name | Expression reducible to constaint |
Category | Design |
Ignorable | true |
Applicable Types | Procedure |
Scalar Function | |
Table Valued Function | |
View |
The comparison expression always evaluates to TRUE or FALSE.
The comparison expression always evaluates to TRUE or FALSE
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 */