Types Supported for Backward Compatibility

TimesTen supports the data types shown in Table 1-3.

Table 1-3 Data types supported for backward compatibility

Data type Description

TT_CHAR[(n[BYTE|CHAR])]

Fixed-length character string of length n bytes or characters

Default is one byte.

BYTE indicates that the column has byte-length semantics. Supported values for n range from a minimum of one byte to a maximum 8300 bytes.

CHAR indicates that the column has character-length semantics. The minimum CHAR length is one character. The maximum CHAR length depends on how many characters fit in 8300 bytes. This is determined by the database character set in use. For character set AL32UTF8, up to four bytes per character may be needed, so the CHAR length limit ranges from 2075 to 8300 depending on the character set.

If you insert a zero-length (empty) string into a column, the SQL NULL value is inserted.

TT_CHAR data is padded to the maximum column size with trailing blanks. Blank-padded comparison semantics are used.

TT_NCHAR[(n)]

Fixed-length string of n two-byte Unicode characters

The number of bytes required is 2*n where n is the specified number of characters. NCHAR character limits are half the byte limits so the maximum size is 4150.

If you insert a zero-length (empty) string into a column, the SQL NULL value is inserted.

TT_NCHAR data is padded to the maximum column size with U+0020 SPACE. Blank-padded comparison semantics are used.

TT_NVARCHAR(n)

Variable-length string of n two-byte Unicode characters

The number of bytes required is 2*n where n is the specified number of characters. TT_NVARCHAR character limits are half the byte limits so the maximum size is 2,097,152 (221). You must specify n.

If you insert a zero-length (empty) string into a column, the SQL NULL value is inserted.

Blank-padded comparison semantics are used.

TT_VARCHAR(n[BYTE|CHAR])

Variable-length character string having maximum length n bytes or characters

You must specify n. BYTE indicates that the column has byte-length semantics. Supported values for n range from a minimum of 1 byte to a maximum 4194304 (222) bytes.

CHAR indicates that the column has character-length semantics.

If you insert a zero-length (empty) string into a column, the SQL NULL value is inserted.

Blank-padded comparison semantics are used.