Numeric Operators
PL/SQL implements several operators that are useful when working with numbers. The operators that can be used with numbers are shown in Table 9-6 in order of precedence. The operators with lower precedence evaluate first while those with a higher precedence evaluate latter. For full details on a particular operator, consult Oracle’s SQL Reference manual.
Table 9-6. Numeric operators and precedence
Operator | Operation | Precedence |
|---|---|---|
** | Exponentiation | 1 |
+ | Identity | 2 |
− | Negation | 2 |
* | Multiplication | 3 |
/ | Division | 3 |
+ | Addition | 4 |
− | Subtraction | 4 |
= | Equality | 5 |
< | Less than | 5 |
> | Greater than | 5 |
<= | Less than or equal | 5 |
>= | Greater than or equal | 5 |
<>, !=, ~=, ^= | Not equal | 5 |
IS NULL | Nullity | 5 |
BETWEEN | Inclusive range | 5 |
NOT | Logical negation | 6 |
AND | Conjunction | 7 |
OR | Inclusion | 8 |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access