SQL Reference

Chapter 2 | Supported standards 25
Character operators
You can concatenate characters.
Examples
In the following examples, last_name is 'JONES ' and first_name is 'ROBERT ':
Date operators
You can modify dates.
Examples
In the following examples, hire_date is DATE '2015-01-30'.
Additional examples:
SELECT Date_Sold, Date_Sold + 30 AS agg FROM Sales_Data
SELECT Date_Sold, Date_Sold - 30 AS agg FROM Sales_Data
Relational operators
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 '2015-02-04'
- Find the number of days between two dates hire_date -
DATE '2015-01-01'
29
Subtract a number of days from a date hire_date - 10 DATE '2015-01-20'
Operator Meaning
= Equal
<> Not equal
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
LIKE Matching a pattern
NOT LIKE Not matching a pattern
IS NULL Equal to Null
IS NOT NULL Not equal to Null
BETWEEN Range of values between a lower and upper bound
IN A member of a set of specified values or a member of a subquery