Character String Data Types - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

--- SQL operation complete.
>>SHOWDDL TABLE t;
CREATE TABLE SCH.T
(
N
)
NO PARTITION
;
--- SQL operation complete.
>>

Character String Data Types

Neoview SQL includes both fixed-length character data and variable-length character data. You
cannot compare character data to numeric, datetime, or interval data.
character-type is:
CHAR[ACTER] [(length [CHARACTERS])] [char-set] [UPSHIFT] [[NOT]CASESPECIFIC]
| CHAR[ACTER] VARYING(length) [CHARACTERS][char-set] [UPSHIFT] [[NOT]CASESPECIFIC]
| VARCHAR(length) [CHARACTERS] [char-set] [UPSHIFT] [[NOT]CASESPECIFIC]
| NCHAR [(length)] [CHARACTERS] [UPSHIFT] [[NOT]CASESPECIFIC]
| NCHAR VARYING (length) [CHARACTERS] [UPSHIFT] [[NOT]CASESPECIFIC]
| NATIONAL CHAR[ACTER] [(length)] [CHARACTERS] [UPSHIFT] [[NOT]CASESPECIFIC]
| NATIONAL CHAR[ACTER] VARYING (length) [CHARACTERS] [UPSHIFT] [[NOT]CASESPECIFIC]
char-set is
CHARACTER SET char-set-name
CHAR, NCHAR, and NATIONAL CHAR are fixed-length character types. CHAR VARYING,
VARCHAR, NCHAR VARYING and NATIONAL CHAR VARYING are varying-length character
types.
length
is a positive integer that specifies the number of characters allowed in the column. You must
specify a value for length.
char-set-name
is the character set name, which can be ISO88591 or UCS2. Although you can specify only
ISO88591 or UCS2 for the character column definition, the character set configuration of your
Neoview platform permits you to store character string data encoded in other character sets.
For more information, see the Neoview Character Sets Administrator's Guide.
CHAR[ACTER] [(length [CHARACTERS])] [char-set] [UPSHIFT] [[NOT]CASESPECIFIC]
specifies a column with fixed-length character data.
CHAR[ACTER] VARYING (length) [CHARACTERS] [char-set] [UPSHIFT]
[[NOT]CASESPECIFIC]
specifies a column with varying-length character data. VARYING specifies that the number
of characters stored in the column can be fewer than the length.
Note that values in a column declared as VARYING can be logically and physically shorter
than the maximum length, but the maximum internal size of a VARYING column is actually
four bytes larger than the size required for an equivalent column that is not VARYING.
VARCHAR (length) [char-set] [UPSHIFT] [[NOT]CASESPECIFIC]
specifies a column with varying-length character data.
VARCHAR is equivalent to data type CHAR[ACTER] VARYING.
NCHAR [(length)] [UPSHIFT] [[NOT]CASESPECIFIC], NATIONAL CHAR[ACTER] [(length)]
[UPSHIFT] [[NOT]CASESPECIFIC]
specifies a column with data in the pre-defined national character set.
248
SQL Language Elements
NUMERIC(128, 30) DEFAULT NULL

Advertisement

Table of Contents
loading

Table of Contents