Thefollowing JDBC function escapes supported:
TIMESTAMPDIFF, TIMESTAMPADD, CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE,
HOUR, MINUTE, SECOND.
ReservedWords
SomeSQL 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
forbiddenfrom occurring unquoted in queries. Any query containing these words unquoted
willimmediately return an error. These forbidden words can be used as attribute names by
enclosingthem in double quotes.
Supported Expression Types
Thefollowing expression types are explicitly supported in this release of the 5800 system:
Makeuse of JDBC escape syntax wherever possible. The escape syntax makes the query
syntaxmore portable without losing functionality.
Comparisonoperations: expr1 OP expr2, where OP is one of =,!=,<>,<=,>=,<,or>.
Thecomparison operations can compare any two expressions (for example, two attribute
valuesor 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-valuedattribute. Note that <> and != are synonyms.
The concatenation operator, expr1 || expr2.
Theconcatenation operator || is an SQL standard way of concatenating two expressions to
producea combined output string.
Useof parentheses to indicate precedence of evaluation.
Booleanoperators AND,OR, and NOT.
expr1 [NOT] LIKE expr2.
Attemptsto match a character expression to a character pattern, which is a character
stringthat includes one or more wildcards.
%matchesany number (zero or more) of characters in the corresponding position in
expr1.
_matchesone character in the corresponding position in expr1.
Anyother character matches only that character in the corresponding position in the
characterexpression.
expr1 BETWEEN expr2 AND expr3
SupportedExpressionTypes
Chapter4 • Sun StorageTek 5800 System Query Language 121