s3-glacier-select-sql-reference-operators

Operators

Amazon S3 Select and S3 Glacier Select support the following operators.

Logical Operators

  • AND
  • NOT
  • OR

Comparison Operators

  • <
  • >
  • <=
  • >=
  • =
  • <>
  • !=
  • BETWEEN
  • IN โ€“ For example: IN ('a', 'b', 'c')

Pattern Matching Operators

  • LIKE
  • _ (Matches any character)
  • % (Matches any sequence of characters)

Unitary Operators

  • IS NULL
  • IS NOT NULL

Math Operators

Addition, subtraction, multiplication, division, and modulo are supported.

  • +
  • -
  • *
  • %

Operator Precedence

The following table shows the operators' precedence in decreasing order.

Operator/ElementAssociativityRequired
-rightunary minus
*, /, %leftmultiplication, division, modulo
+, -leftaddition, subtraction
INset membership
BETWEENrange containment
LIKEstring pattern matching
<>less than, greater than
=rightequality, assignment
NOTrightlogical negation
ANDleftlogical conjunction
ORleftlogical disjunction