Expressions are composed of a combination of data values and operators.
Data values may be specified as constants (literal values), or
retrieved from a database. Database values are specified by using the
name of the data column. The name must be specified exactly as
recorded in the DBMS. Database columns names are casesensitive, and
AREA
will refer to a different column than
Area
.
Important  

Most DBMS store column names in upper or lower or mixed case, depending on how the value was defined. Unfortunately some applications display column names with a different capitalization than is actually stored in the database, and treat column names in a caseinsensitive manner. This often leads people to think that column name case does not matter. Care must be taken to identify columns using the correct case as originally deifned. 
Operators are applied to data values or combine several data values (e.g. "1 + 1"). When an expression contains multiple operators the operators are applied in sequence according to a standard set of rules of operator precedence. Table 2 lists the available operators in order of precedence from highest to lowest. For example, in the expression "1 + 2 * 3" we can tell the multiplication will occur before the addition because multiplication is listed first in the precedence table. Where several identical operators occur in a row they are evaluated from left to right. Parentheses may be used to explicitly control the order of evaluation (e.g. "(1 + 2) * 3").
Some of the operators have several aliases. For example the relational 'less than' operator can be represented by the symbols 'lt' or '<'. There is no difference between these two usages. Capitalization does not matter in operator symbols ('AND' is the same as 'And' is the same as 'and').
An expression may be composed of several subexpressions, each separated by the semicolon (;) character. The subexpressions will be evaluated in sequence, and the returned value of the expression will be the value of the final subexpression. Values produced by the initial subexpressions will be discarded, however these subexpressions may have side effects (e.g. the setVar() function) that influence subsequent subexpressions.
Operator  Syntax  Description  Result 

Bitwise Compliment 

Performs a bitwise complement operation. The result will always be an integer. 
<integer> 
Logical Not 

Performs a logical not operation on a boolean value. If the operand is true, the result will be false. If the operand is false, the result will be true. 
<bool> 
Negation 

Returns the negative of the original value. 
<int> or <number> 
Product 

Multiple, divide or modulo two values. If both values are integers the result will be an integer. If one of both of the values is a number the result will be a number. 
<int> or <number> 
Summation 

Add or subtract two values. If both values are integers the result will be an integer. If one of both of the values is a number the result will be a number. 
<int> or <number> 
Concatenation 

The string values of the two operands are concatenated together. If one of the operands is not a string value, it will undergo automatic promotion to a string. 
<string> 
Bit shift 

These operators implement bit operations for logical shift right '>>>', signed shift right '>>' and shift left '<<'. The value on the left is the bit field to be shifted, and the value on the right is the amount of the shift. These operators always return an integer bitfield. 
<int> 
Relational 
where op can be:

Compare two values using a relational operator. The values may be both strings (in which case a lexicographical comparison is made), both integers (an integer comparison is made), or a combination of integers and numbers (automatic type promotion occurs and the numbers are compared). 
<bool> 
value in list 
where op can be:

If the right operand is a string it is assumed to be a commaseparated list of string values (e.g. 'A,B,C') and will be converted to a list using the split function. The 'in' operator will test to see if the left operand is equal to any of the values in the right hand list. If an exact match is found the result will be true, otherwise false. 
<bool> 
Inequality 

The inequality operator performs a test to see if the two operands are not equal. The result is always a boolean. 
<bool> 
Equality 

The equality operator performs a test to see if the two operands are equal. The result is always a boolean. 
<bool> 
Binary 'and' 

The binary 'and' operator combines the bit fields in two integers using an 'and' operation. The result is always an integer. 
<int> 
Binary 'xor' 

The binary 'exclusive or' operator combines the bit fields in two integers using an 'xor' operation. The result is always an integer. 
<int> 
Binary 'or' 

The binary 'or' operator combines the bit fields in two integers using an 'or' operation. The result is always an integer. 
<int> 
Logical 'and' 

The logical 'and' operator combines two boolean operands. The results is 'true' only if both operands evaluate to 'true'. 
<bool> 
Logical 'or' 

The logical 'or' operator combines two boolean operands. The results is 'true' if either operand evaluates to 'true'. 
<bool> 