SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
S-82
Examples—String Literals
Examples—String Literals
This string literals do not have an associated character set:
"This is an ordinary literal."
"This literal contains "" a quotation mark."
"This SQLCI literal is" &
" in three parts, " &
"specified over three lines"
'1234.56'
_UNKNOWN"abc^&*"
This string literals have associated character sets. The first is associated with a
single-byte character set, and the second and third are associated with double-
byte character sets. The third is associated with either KANJI or KSC5601,
depending on the default national character data type in effect on the node.
_ISO88594'SMITH, JOHN'
_KANJI"c1c2c3c4c5c6"
N"c1c2c3c4c5c6c7c8c9"
Subqueries
A subquery is a special form of the SELECT statement that selects only for
comparison. You can specify a subquery in a comparison, EXISTS, IN, or qualified
predicate of a search condition.
For the complete syntax and rules for the elements and clauses of a subquery, see
SELECT Statement on page S-18. For examples that use subqueries, see Comparison
Predicate on page C-58 or EXISTS Predicate on page E-12.
( SELECT [ ALL | DISTINCT ] { expression }
{ * }
{ correlation-name.* }
{ table-name.* }
{ view-name.* }
FROM table-ref [, table-ref] ...
[ WHERE search-condition]
[ HAVING search-condition]
[ [ FOR ] { BROWSE | STABLE | REPEATABLE } ACCESS ]
[ IN { SHARE | EXCLUSIVE } MODE ]
[ GROUP BY column-name [, column-name] ] ...
[ UNION [ ALL ] select-statement] )