# SQL Server Rule: SRP0006
| | |
|----|----|
| Assembly | SqlServer.Rules |
| Namespace | SqlServer.Rules.Performance |
| Class | AvoidNotEqualToRule |
## Rule Information
| | |
|----|----|
| Id | SRP0006 |
| Friendly Name | Use of inequality |
| Category | Performance |
| Ignorable | true |
| Applicable Types | Procedure |
| | Scalar Function |
| | Table Valued Function |
| | View |
## Description
Try to avoid using not equal operator (<>,!=) in the WHERE clause if possible. (Sargable)
## Summary
Avoid using not equal operator (<>,!=) in the WHERE clause. (Sargeable)
### Remarks
The rule checks for usage of the not equal operator in the WHERE clause as it result table
and index scans. Consider replacing the not equal operator with equals (=) or inequality
operators (>,>=,<,<=) if possible.
<sub><sup>Generated by a tool</sup></sub>