Home
WHERE clauses should not contain redundant conditions
Rule description
- WHERE clauses should not contain redundant conditions
Non-compliant Code Example
SELECT Product.ProductID,
Product.Name,
Color
FROM Production.Product
WHERE ListPrice > 50 AND ListPrice = 200; --Non compliant code (Where clause is having redundant conditions)
Compliant Code Example
SELECT Product.ProductID,
Product.Name,
Color
FROM Production.Product
WHERE ListPrice > 50; --Compliant code (Where clause is not having redundant conditions)