PL/SQL - Operator (Precedence)

Card Puncher Data Processing

About

The operations within an expression are evaluated in order of precedence. Operators with equal precedence are applied in no particular order.

This table show the operator from the highest to the lowest level.

Order Operator Operation
1 ** exponentiation
2 +, - identity, negation
3 *, / multiplication, division
4 +, -, || addition, subtraction, concatenation
5 =, <, >, <=, >=, <>, !=, ~=, ^=, IS NULL, LIKE, BETWEEN, IN comparison
6 NOT logical negation
7 AND conjunction
8 OR inclusion

You can use parentheses to control the order of evaluation. When parentheses are nested, the most deeply nested subexpression is evaluated first.

For instance, when NOT, AND and OR are used in the same statement :

  • NOT is evaluated first,
  • then AND,
  • and finally OR.

Reference





Discover More
Card Puncher Data Processing
PL/SQL - (Procedure Language|PL) SQL

PlSql is the development language of the oracle database. SQL was designed from the start to operate on SETS (ie parallel task) whereas PL/SQL brought a lot in terms of exception handling. PL/SQL...



Share this page:
Follow us:
Task Runner