SQL - Structured Query Language

Comparison Operators



An operator is a symbol specifying an action that is performed on one or more expressions. SQL Server operators can categories into Arithmetic Operators, Assignment Operator, String Concatenation Operator, Comparison Operators, Bitwise Operators, Unary Operators, Compound Operators, Scope Resolution Operator, Logical Operators and SET Operators.

Comparison operators are used to checks a condition between two variables or expressions values that returns TRUE or FALSE Boolean data. Comparison operators cannot checks with text, ntext or image data types.

Symbol Name Description
= Equals To returns TRUE when left side variable or expression is equal with right side variable or expression value.
> Greater Than To returns TRUE when left side variable or expression is greater than with right side variable or expression value.
< Less Than To returns TRUE when left side variable or expression is less than with right side variable or expression value.
>= Greater Than or Equal To To returns TRUE when left side variable or expression is greater than or equal with right side variable or expression value.
<= Less Than or Equal To To returns TRUE when left side variable or expression is less than or equal with right side variable or expression value.
<> Not Equal To To returns TRUE when left side variable or expression is not equal with right side variable or expression value.
!= Not Equal To To returns TRUE when left side variable or expression is not equal with right side variable or expression value.
!< Not Less Than To returns TRUE when left side variable or expression is not less than with right side variable or expression value.
!> Not Greater Than To returns TRUE when left side variable or expression is not greater than with right side variable or expression value.

* * * * *


Email Your Comment To AUTHOR