VistaDB 5
Gibraltar VistaDB > Developer's Guide > SQL Reference > SQL Reference - Operators
SQL Reference - Operators

Operator Precedence

The following the order of operator precedence in VistaDB.

Level Operators
0 ~ (Bitwise NOT), EXISTS
1 * (Multiply), / (Division), % (Modulo)
2 + (Positive), - (Negative), + (Add), (+ Concatenate), - (Subtract), & (Bitwise AND), ^ (Bitwise Exclusive OR), | (Bitwise OR)
3 =, >, <, >=, <=, <>, !=, !>, !< (Comparison operators)
4 NOT
5 AND
6 OR

Optimizable Operators

The following list contains the operators we attempt to optimize during our SQL parsing. If you have a problem with a particular select and it involves one of these operators you may wish to try it without optimization.

=, >, <, >=, <= (Comparison operators)
BETWEEN, LIKE
AND
OR

JOIN Operators

The following list contains the JOIN operators we currently support. We will add more later.

=, >, <, >=, <=, <> (Comparison operators)
BETWEEN

(not that IN is NOT supported)

Operator ISNULL Values

This table shows for a given operator can the ISNULL operator be true.
For example performing a SQL statement like ISNULL(~@Variable) is legitimate. But performing ISNULL( @VARIABLE IS NULL ) is not valid.

Operator(s) Can IsNull be True?
~ (Bitwise NOT) Yes
EXISTS Yes
* (Multiply), / (Division), % (Modulo) Yes
+ (Positive), - (Negative) Yes
+ (Add), (+ Concatenate), - (Subtract) Yes
& (Bitwise AND), ^ (Bitwise Exclusive OR), | (Bitwise OR) Yes
=, >, <, >=, <=, <>, != (Comparison operators) Yes
BETWEEN, IN, LIKE Yes
IS NULL No
NOT Yes
AND Yes
OR Yes


See Also