User Tools

Site Tools


Sidebar

**HPL/SQL is included to Apache Hive since version 2.0** * [[home|Home]]\\ * [[why|Why HPL/SQL]]\\ * [[features|Key Features]]\\ * [[start|Get Started]]\\ * [[doc|HPL/SQL Reference]]\\ * [[download|Download]]\\ * [[new|What's New]]\\ * [[about|About]]

equal

====== Equality and Comparison Operators - PL/HQL ====== You can use equality and comparison operators %%=, ==, <>, !=, <, >, >=, <=%% to determine if one operand is equal, not equal, less or greater than another operand. | = | == | Equal | | <> | != | Not equal | | > || Greater than | | < || Less than | | %%>=%% || Greater than or equal | | %%<=%% || Less than or equal | **Syntax:** <code> expr = expr expr == expr expr <> expr expr != expr expr > expr expr < expr expr >= expr expr <= expr </code> **Examples:** | **Expression** | **Result** | **Result Type** | | 3 = 3 | True | Boolean | | 3 = 1 | False | Boolean | | 'CA' = NULL | NULL | Boolean | | 3 == 3 | True | Boolean | | 3 <> 3 | False | Boolean | | 3 != 3 | False | Boolean | | 3 > 1 | True | Boolean | | 3 < 1 | False | Boolean | | 3 %%>=%% 1 | True | Boolean | | 3 %%<=%% 1 | False | Boolean |