The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

The <=> operator in Vertica

This blog post was authored by Jim Knicely.

The <=> operator performs an equality comparison like the = operator, but it returns true, instead of NULL, if both operands are NULL, and false, instead of NULL, if one operand is NULL.


dbadmin=> SELECT 1 = 2         "Returns FALSE",
dbadmin->        1 <=> 2       "Returns FALSE",
dbadmin->        1 <> NULL     "Returns NULL",
dbadmin->        1 <=> NULL    "Returns FALSE",
dbadmin->        NULL <=> NULL "Returns TRUE";
Returns FALSE | Returns FALSE | Returns NULL | Returns FALSE | Returns TRUE
f             | f             |              | f             | t
(1 row)

Have fun!

Sign In or Register to comment.