Oracle 5.0 Reference Manual page 896

Table of Contents

Advertisement

mysql>
SELECT '.01' = 0.01;
-> 1
[876]
<=>
NULL-safe equal. This operator performs an equality comparison like the
returns
rather than
1
NULL.
mysql>
SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;
-> 1, 1, 0
mysql>
SELECT 1 = 1, NULL = NULL, 1 = NULL;
-> 1, NULL, NULL
[876],
[876]
<>
!=
Not equal:
mysql>
SELECT '.01' <> '0.01';
-> 1
mysql>
SELECT .01 <> '0.01';
-> 0
mysql>
SELECT 'zapp' <> 'zappp';
-> 1
[876]
<=
Less than or equal:
mysql>
SELECT 0.1 <= 2;
-> 1
[876]
<
Less than:
mysql>
SELECT 2 < 2;
-> 0
[876]
>=
Greater than or equal:
mysql>
SELECT 2 >= 2;
-> 1
[876]
>
Greater than:
mysql>
SELECT 2 > 2;
-> 0
IS boolean_value
Tests a value against a boolean value, where
mysql>
SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;
-> 1, 1, 1
IS boolean_value
IS NOT boolean_value
Tests a value against a boolean value, where
mysql>
SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT UNKNOWN;
Comparison Functions and Operators
if both operands are NULL, and
NULL
[876]
[876]
syntax was added in MySQL 5.0.2.
[876]
876
rather than
0
can be TRUE, FALSE, or UNKNOWN.
boolean_value
can be TRUE, FALSE, or UNKNOWN.
boolean_value
[875]
operator, but
=
if one operand is
NULL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents