Home
Identical expressions should not be used on both sides of a binary operator
Rule description
- Identical expressions should not be used on both sides of a binary operator
Non-compliant Code Example
DECLARE @MyProduct int; SET @MyProduct = 750; IF (@MyProduct <> 500) SELECT ProductID, Name, ProductNumber FROM Production.Product WHERE ProductID = @MyProduct AND ProductID = @MyProduct; --Non compliant code (Identical expressions is used on the both side of binary operator)