Literals; Character String Literals - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

Literals

A literal is a constant you can use in an expression, in a statement, or as a parameter value.
Literals are stored in columns of tables according to how you specify the column definitions in
a CREATE TABLE statement. An SQL literal can be one of these data types:
"Character String Literals" (page 223)
"Datetime Literals" (page 225)
"Interval Literals" (page 226)
"Numeric Literals" (page 228)

Character String Literals

"Considerations for Character String Literals"
"Examples of Character String Literals"
A character string literal is a series of characters enclosed in single quotes.
[_character-set | N]'string'
_character-set
specifies the character set ISO88591 and UCS2. If you omit the character set specification, the
default is whatever character set default you set when you installed Neoview SQL. See
"Character Sets" (page
N
associates the system default character set with the string literal. The default is set by the
value of the NATIONAL_CHARSET attribute during the Neoview SQL installation.
'string'
is a series of any input characters enclosed in single quotes. A single quote within a string is
represented by two single quotes (''). A string can have a length of zero if you specify two
single quotes ('') without a space in between.
You can specify string literals using hexadecimal code values in DML statements.
[_character-set | N] X'hex-code-value... '
| [_character-set | N] X'[space ]hex-code-value[[space ]
hex-code-value...][space ]'
_character-set
specifies the character set ISO88591 or UCS2. If you omit the character set specification, the
default is whatever character set default you set when you installed Neoview SQL. See
"Character Sets" (page
N
associates the system default character set with the string literal. The default is set by the
value of the NATIONAL_CHARSET attribute during the Neoview SQL installation.
X
represents the X in hexadecimal notation.
'hex-code-value'
represents the code value of a character in hexadecimal form enclosed in single quotes. It
must contain an even number of hexadecimal digits. For UCS2, each hex-code-value must
be of four hexadecimal digits long. For ISO88591, each value must be two digits long. If
A series of characters enclosed in single quotes. Example:
'Planning'
Begins with keyword DATE, TIME, or TIMESTAMP and
followed by a character string. Example: DATE
'1990-01-22'
Begins with keyword INTERVAL and followed by a
character string and an interval qualifier. Example:
INTERVAL '2-7' YEAR TO MONTH
A simple numeric literal (one without an exponent) or a
numeric literal in scientific notation. Example: 99E-2
190).
190).
Literals
223

Advertisement

Table of Contents
loading

Table of Contents