Database Reference
In-Depth Information
Operators
An operator is a symbol specifying an action that is performed on one or more expres-
sions. Operators are used with multiple statements in SQL. There are various kinds
of operators in SQL. They are as follows:
• Arithmetic operators
• Logical operators
• The assignment operator
• Scope-resolution operators
• Bitwise operators
• Set operators
• Comparison operators
• The string-concatenation operator
• Compound operators
• Unary operators
Explaining each kind of operator is out of our scope here, so we will discuss a few
commonly used operators in Impala as follows.
BETWEEN : The BETWEEN operator is used with the WHERE clause, and this
operator compares the values between the lower and upper bound given with
the WHERE clause. The comparison is successful if the expression is greater
than or equal to the lower bound and less than or equal to the upper bound.
If the bound values are switched, the lower bound is greater than the upper
bound; the BETWEEN operator does not match any values as a result. The syn-
tax to use the BETWEEN operator with the WHERE clause is as follows:
expression BETWEEN lower_bound AND
upper_bound
Example:
SELECT column_name FROM table_name WHERE
value_in_column BETWEEN lower_bound AND
upper_bound;
Here are a few key things to remember when using the BETWEEN operator in
Impala:
Search WWH ::




Custom Search