Navigation:  NexusDB Guide > SQL Reference > SQL Data Types >

String Types

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

String Types

button_main button_prev button_next

NexusDB Manual V3 > SQL Reference > SQL Data Types

Syntax

 

<character string type> ::=

 

 

|

|

|

|

|

|

|

|

 

CHARACTER [ ( length ) ]

CHAR [ ( length ) ]

NULLSTRING [ ( length ) ]

SHORTSTRING [ ( length ) ]

SINGLECHAR

CHARACTER VARYING [ ( length ) ]

CHAR VARYING [ ( length ) ]

VARCHAR [ ( length ) ]

<character large object type>

<character large object type> ::=

 

 

|

|

|

 

CHARACTER LARGE OBJECT [ ( length ) ]

CHAR LARGE OBJECT [ ( length ) ]

CLOB [ ( length ) ]

TEXT [ ( length ) ]

<national character string type> ::=

 

 

|

|

|

|

|

|

|

|

 

NATIONAL CHARACTER [ ( length ) ]

NATIONAL CHAR [ ( length ) ]

NCHAR [ ( length ) ]

NSINGLECHAR

NATIONAL CHARACTER VARYING [ ( length ) ]

NATIONAL CHAR VARYING [ ( length ) ]

NCHAR VARYING [ ( length ) ]

NVARCHAR [ ( length ) ]

<national character large object type>

<national character large object type> ::=

 

 

|

|

 

NATIONAL CHARACTER LARGE OBJECT [ ( length ) ]

NCHAR LARGE OBJECT [ ( length ) ]

NCLOB [ ( length ) ]

<binary large object string type> ::=

 

 

|

|

 

BINARY LARGE OBJECT [ ( length ) ]

BLOB [ ( length ) ]

IMAGE [ ( length ) ]

 

Notes

 

§

NexusDB stores string data either in fixed or variable length, depending on the STORAGE attribute in the table definition.

 

§

If the length argument is omitted, then a length of 1 is implicit.

 

§

The large object types have a dynamic length in NexusDB, up to the maximum capacity. Specifying the length argument has no effect, and is only included for syntax compatibility with SQL:2003.

 

§

The character string type defines a single-byte ANSI string.

 

§

CHARACTER is a fixed-length character string type with a maximum length of 8192 characters. Values are padded with trailing spaces on data retrieval to fill the fixed length.

 

§

CHAR is equivalent to CHARACTER.

 

§

CHARACTER VARYING is a variable-length character string type with the same maximum length as CHARACTER.

 

§

CHAR VARYING and VARCHAR are equivalent to CHARACTER VARYING.

 

§

NULLSTRING is a NexusDB synonym for CHARACTER VARYING.

 

§

SHORTSTRING is a NexusDB-specific variable-length character string type with a maximum length of 255 characters.

 

§

SINGLECHAR is a NexusDB-specific type that defines a single 8-bit character.

 

§

CHARACTER LARGE OBJECT is a large object character string type with a maximum capacity of 4GB.

 

§

CHAR LARGE OBJECT and CLOB are equivalent to CHARACTER LARGE OBJECT.

 

§

TEXT is a NexusDB synonym for CHARACTER LARGE OBJECT.

 

§

The national character string type defines a double-byte Unicode string with implicit character set UTF16.

 

§

NATIONAL CHARACTER is a fixed-length character string type with a maximum capacity of 32767 characters. Values are padded with trailing spaces on data retrieval to fill the fixed length.

 

§

NATIONAL CHAR and NCHAR are equivalent to NATIONAL CHARACTER.

 

§

NSINGLECHAR is a NexusDB-specific type that defines a single 16-bit character.

 

§

NATIONAL CHARACTER VARYING is a variable-length character string type with the same maximum length as NATIONAL CHARACTER.

 

§

NATIONAL CHAR VARYING and NCHAR VARYING are equivalent to NATIONAL CHARACTER VARYING.

 

§

NVARCHAR is a NexusDB synonym for NATIONAL CHARACTER VARYING.

 

§

NATIONAL CHARACTER LARGE OBJECT is a large object character string type with a maximum capacity of 4GB.

 

§

NCHAR LARGE OBJECT and NCLOB are equivalent to NATIONAL CHARACTER LARGE OBJECT.

 

§

BINARY LARGE OBJECT is a large object binary string type with a maximum capacity of 4GB.

 

§

BLOB is equivalent to BINARY LARGE OBJECT.

 

§

IMAGE is a NexusDB-specific large object binary string type with a maximum capacity of 4GB.

 

§

Two character strings are comparable only if they use the same collation and compare flags.

 

§

A character string is assignable to any character string site, including sites having a different character set, provided that data loss does not occur during the translation. An exception is raised if an assignment leads to truncation of the character string data.

 

§

A binary string is only assignable to a binary string type.

 

 


Conformance

 

SQL:2003 standard

 

 

 

NexusDB extensions

-

-

-

 

-

-

-

-

-

-

-

Core SQL

Feature F421 "National character"

Feature T041 "Basic LOB data type support"

 

NULLSTRING

SHORTSTRING

SINGLECHAR

TEXT

NSINGLECHAR

NVARCHAR

IMAGE

 

© Nexus Database Systems Pty Ltd.

nexus_logo