Arithmetic Operators

Arithmetic operators are used to perform computations.

Syntax

 
    select val1 operator val2 [operator val3 .. operator valN]
     

The eXtremeSQL arithmetic operators are the following:

+ Add operands
- Subtract operands
* Multiply operands
/ Divide operands

Examples

 
    select 17 / 5 + 3;
    #1
    ------------------------------------------------------------------------------
    6
 
    Selected records: 1
     
    create table t(i integer, d date);
    insert into t values([3,5],['2017-01-01','2017-02-01']);
     
    select i-1, d+(60*60*24) from t;
    #1      #2
    ------------------------------------------------------------------------------
    2       01/02/2017 00:00:00
    4       02/02/2017 00:00:00
     
    Selected records: 2