SQL Flow Field Guide

<> (Not Equal To)

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

comparison <> (Not Equal To)

What changes

Input
two expressions
Output or change
TRUE, FALSE or UNKNOWN (UNKNOWN when either side is NULL under ANSI_NULLS ON)
Return type
Boolean

Syntax at a glance

expression <> expression

Work example

A filter needs <> (Not Equal To) to compare values with a stated boundary rule.

Test equal, lower, higher, and NULL values. Prefer the standard comparison spelling used by the project.

Check your work <> (Not Equal To). The boundary result for <> (Not Equal To) matches the written rule and NULL is handled separately.

Open Microsoft Learn for full syntax, permissions, and details for your version.