Sun Microsystems 5800 User Manual

Page of 136
The following JDBC function escapes supported:
TIMESTAMPDIFF, TIMESTAMPADD, CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE,
HOUR, MINUTE, SECOND
.
Reserved Words
Some SQL reserved words (such as BETWEEN or LIKE) are allowed in queries and are expected to
occur. An SQL reserved word cannot be used as an attribute name unless it is enclosed in double
quotes (for example, "FIRST"). Some other SQL reserved words (such as SELECT or CREATE) are
forbidden from occurring unquoted in queries. Any query containing these words unquoted
will immediately return an error. These forbidden words can be used as attribute names by
enclosing them in double quotes.
Supported Expression Types
The following expression types are explicitly supported in this release of the 5800 system:
Make use of JDBC escape syntax wherever possible. The escape syntax makes the query
syntax more portable without losing functionality.
Comparison operations: expr1 OP expr2, where OP is one of =, !=, <>, <=, >=, <, or >.
The comparison operations can compare any two expressions (for example, two attribute
values or one attribute value and one literal value). The two values must be of compatible
types. For example, a < comparison cannot be used between a numeric literal value and a
string-valued attribute. Note that <> and != are synonyms.
The concatenation operator, expr1 || expr2.
The concatenation operator || is an SQL standard way of concatenating two expressions to
produce a combined output string.
Use of parentheses to indicate precedence of evaluation.
Boolean operators AND, OR, and NOT.
expr1 [NOT] LIKE expr2
.
– Attempts to match a character expression to a character pattern, which is a character
string that includes one or more wildcards.
– % matches any number (zero or more) of characters in the corresponding position in
expr1
.
– _ matches one character in the corresponding position in expr1.
– Any other character matches only that character in the corresponding position in the
character expression.
expr1 BETWEEN expr2 AND expr3
Supported Expression Types
Chapter 4 • Sun StorageTek 5800 System Query Language
121