SQL Reference

Chapter 2 | Supported standards 25
Exponential/scientific notation
Numbers can be expressed using scientific notation.
Example
SELECT column1 / 3.4E+7 FROM table1 WHERE calc < 3.4E-6 * column2
Numeric operators
You can include the following operators in number expressions: +, -, *, /, and ^ or **
(exponentiation).
You can precede numeric expressions with a
unary plus (+) or minus (-).
Character operators
You can concatenate characters. In the following, last_name is 'JONES ' and first_name is
'ROBERT '.
Date operators
You can modify dates. In the following, hire_date is DATE '2019-01-30'.
Addtional examples
SELECT Date_Sold, Date_Sold + 30 AS agg FROM Sales_Data
SELECT Date_Sold, Date_Sold - 30 AS agg FROM Sales_Data
Operator Concatenation Example Result
+ Keep trailing blank characters first_name + last_name 'ROBERT JONES '
- Move trailing blank characters to the end first_name - last_name 'ROBERTJONES '
Operator Effect on date Example Result
+ Add a number of days to a date hire_date + 5 DATE '2019-02-04'
- Find the number of days between two dates hire_date -
DATE '2019-01-01'
29
Subtract a number of days from a date hire_date - 10 DATE '2019-01-20'