DF078: Non-ISO standard comparison operator found.
Last modified: June 12, 2025
The topic describes the DF078 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
Non-ISO standard comparison operator found.
Description
To ensure cross-platform and future version compatibility, it is recommended to use ISO standard comparison operators.
Additional information
Using ISO standard comparison operators is recommended over non-ISO standard operators to ensure optimal cross-platform and future version compatibility. While currently acceptable, keep in mind that statements using non-ISO operators might not be supported on other ISO-compliant database management systems. Additionally, non-ISO standard comparison operators may not be supported in future SQL Server versions.
Replace the Non-ISO comparison operators with ISO standard operators:
- Not equal to: Use
<>
instead of!=
- Greater than or equal to: Use
>=
instead of!<
- Less than or equal to: Use
<=
instead of!>
Noncompliant code example
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
WHERE c.Id != 10;
GO
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
WHERE c.Id !> 10;
GO
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
WHERE c.Id !< 10;
GO
Compliant solution
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
WHERE c.Id <> 10;
GO
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
WHERE c.Id <= 10;
GO
SELECT c.FirstName, c.LastName
FROM dbo.Customer c
WHERE c.Id >= 10;
GO
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.