= (Equals) (TSQL Operator)
Returns the result of =
comparison of two expressions.
Syntax
expression = expression
Arguments
- expression
- is an expression of any type.
Return Types
Returns a bool
value.
Remarks
If expressions are varchar
, the comparison is affected by the collation.
If any expression is NULL, result is NULL.
Examples
PRINT NULL = NULL;
PRINT 1234 = NULL;
PRINT 1234 = 78;
PRINT 1234 = 1234;
PRINT 1234 = 3000;
The result is:
<NULL>
<NULL>
false
true
false