Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 206 207 208 209 210 211 < 212 > 213 214 215 216 217 218 .. 241 >> Next

SMALLINT 16-bit signed two’s complement binary number, most significant byte first (2 bytes)
INTEGER 32-bit signed two’s complement binary number, most significant byte first (4 bytes)
FLOAT 64-bit (double precision) floating point number, most significant byte first, with 1 bit for fraction’s sign, 7 bits for unsigned power of 16 exponent (stored as actual + hex 40) and 56 bits for unsigned fraction (8 bytes)
DECIMAL(x,y) x-digit, signed, packed decimal in which the rightmost nibble represents the sign (“ + ” is hex A,E,F or C; “-” is hex B or D) and the remaining nibbles represent the digits (hex 0-9) which are left-padded with zero digits if x is even (total (x+2)/2 bytes, 8 bytes maximum)
CHAR(n) n ASCII characters (n bytes), n defaults to 1
VARCHAR(n) 16-bit SMALLINT (2 bytes) containing actual count k, followed by k ASCII characters (total of k + 2 bytes) (actual length k, where 0 <= k <= n)
LONG VARCHAR Equivalent to VARCHAR(32000)
BYTE(n) n bytes, n defaults to 1
VARBYTE(n) 16-bit SMALLINT (2 bytes) containing actual count k, followed by k bytes (total of k + 2 bytes) (actual length k, where 0 <= k <= n)
DATE 32-bit signed two’s complement integer, most significant byte first; DATE is: (year-1900)*10000 + month*100 + day (4 bytes)

F-8

Teradata RDBMS for UNIX SQL Reference
Data Conversion

VAX or VMS Internal Format

VAX or VMS Internal Format

Data Type Format
BYTEINT 8-bit signed two’s complement binary number (1 byte)
SMALLINT 16-bit signed two’s complement binary number, least significant byte first (2 bytes)
INTEGER 32-bit signed two’s complement binary number, least significant byte first (4 bytes)
FLOAT VAX D - floating, most significant byte first, with 1 bit for fraction’s sign, 8 bits for power of 2 exponent (stored as actual + hex 80H), 55 bits for unsigned fraction. An extra preceding bit is implied (total of 8 bytes).
DECIMAL(x,y) x-digit, signed, packed decimal in which the rightmost nibble represents the sign (“ + ” is hex A,E,F or C; “-” is hex B or D) and the remaining nibbles represent the digits (hex 0-9), which are left-padded with zero digits if x is even (total of (x+2)/2 bytes; 8 byte maximum)
CHAR(n) n ASCII characters (n bytes); n defaults to 1
VARCHAR(n) 16-bit SMALLINT, least significant byte first, actual count k, followed by k ASCII characters (total of k + 2 bytes) (actual length k, where 0 <= k <= n)
LONG VARCHAR Equivalent to VARCHAR(32000)
BYTE(n) n bytes, n defaults to 1
VARBYTE(n) 16-bit SMALLINT (2 bytes) containing actual count k, followed by k bytes (total of k + 2 bytes) (actual length k, where 0 <= k <= n)
DATE 32-bit signed two’s complement integer, least significant byte first; dAtE is: (year-1900)*10000 + month*100 + day (4 bytes)

Teradata RDBMS for UNIX SQL Reference

F-9
Data Conversion

PC Internal Format

PC Internal Format

Data Type Format
BYTEINT 8-bit signed two’s complement binary number (1 byte)
SMALLINT 16-bit signed two’s complement binary number, least significant byte first (2 bytes)
INTEGER 32-bit signed two’s complement binary number, least significant byte first (4 bytes)
FLOAT 64-bit (double precision) floating point number, least significant byte first; there is 1 bit for the fraction sign, 11 bits for the unsigned power of 16 exponent (stored as +3FFh), and 52 bits for unsigned fraction. An extra preceding bit is implied (8 bytes total)
DECIMAL(x,y) 8 bit if x <= 2, 16 bit if x <= 4, 32 bit if x <= 9, or 64 bit if x <= 19; signed two’s complement binary number, least significant byte first. 1, 2, 4, or 8 bytes
CHAR(n) If character set is Shift-JIS, n bytes containing mixed single byte/multibyte characters (ASCII, KATAKANA, and Shift-JIS multibyte character). Otherwise, n bytes of ASCII data.
VARCHAR(n) 16-bit integer (2 bytes, least significant byte first) containing actual count k, depending on the character set, followed by k bytes of mixed single byte /multibyte characters (ASCII, KATAKANA, and Shift-JIS multibyte character) or k ASCII characters (total of k + 2 bytes) (actual length k, where 0 <= k <= n).
LONG VARCHAR Equivalent to VARCHAR(32000)
BYTE(n) n bytes; n defaults to 1
VARBYTE(n) 16-bit SMALLINT (2 bytes) containing actual count k, followed by k bytes (total of k + 2 bytes). (actual length k, where 0 <= k <= n)
DATE 32-bit signed two’s complement integer, least significant byte first; dAtE is: (year-1900)*10000 + month*100 + day (4 bytes)
GRAPHIC(n) n Shift-JIS double byte character characters.

F-10

Teradata RDBMS for UNIX SQL Reference
Data Conversion

PC Internal Format

Data Type Format
VARGRAPHIC(n) 16-bit integer (2 bytes, least significant byte first) containing actual count k, followed by k/2 Shift-JIS double byte characters (total of k + 2 bytes) (actual length k, where 0 <= k <= n).
LONG VAR GRAPHIC Equivalent to VARGRAPHIC (16000).

F-11
Data Conversion PC Internal Format
International Character Support

Appendix G

International Character Support
Previous << 1 .. 206 207 208 209 210 211 < 212 > 213 214 215 216 217 218 .. 241 >> Next