The topic describes the DF078 T-SQL code analysis rule.
BEST PRACTICE
Non-ISO standard comparison operator found.
To ensure cross-platform and future version compatibility, it is recommended to use ISO standard comparison operators.
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:
<>
instead of !=
>=
instead of !<
<=
instead of !>
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
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