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 .. 35 36 37 38 39 40 < 41 > 42 43 44 45 46 47 .. 241 >> Next


The INTEGER data type represents a signed, binary integer (-2, -1, + 1, +2, and so on) value from -2,147,483,648 to 2,147,483,647. An INTEGER value occupies four bytes.

INTEGER

IIIMII C OT CO I I I I I I I Illlll I I I I I I I

value range -2,147,483,648 to +2,147,483,647 ffisaoo5

INTEGER values are stored with the least significant byte first.

In the following column definition, TelNo is assigned the INTEGER data type:

TelNo INTEGER,

INTEGER can be abbreviated as INT.

The default display format is -(10)9 or------------9

5-22

Teradata RDBMS for UNIX SQL Reference
Introduction

Floating Point Value Storage and Manipulation

Data Definition

FLOAT, REAL, and DOUBLE PRECISION Numeric Data Types

FLOAT, REAL, and DOUBLE PRECISION Numeric Data Types

The FLOAT, REAL, and DOUBLE PRECISION data types represent a value in sign/magnitude form. These data types represents values that range from 2.226 x 10**-308 to 1.797 x 10**308.

FLOAT

8 bytes; value range 2 * 10-307 to 2 * 10+308

FF19A006

The mantissa sign is in the most significant bit position; the exponent sign is a part of the exponent field (excess-1024 notation, in which (1024 - exponent) = sign.

Floating point values are stored and manipulated internally in IEEE floating point format. Floating point values are stored with the least significant byte first, with one bit for the mantissa sign, 11 bits for the exponent, and 52 bits for the mantissa. Eight bytes are used to hold a floating point value. Negative numbers differ from positive numbers of the same magnitude only in the sign bit.

FLOAT is synonymous with REAL and DOUBLE PRECISION.

Note: The Teradata RDBMS supports client system normalized floating point values; client system un-normalized floating point values are not supported.

Answers for identical computations in floating point arithmetic may produce slightly different results because internal precision differs from computer to computer, and from model to model in the same series of computer.

The range of IEEE floating point values may be wider than that of the client system format. Therefore, values may be created and stored in the Teradata RDBMS that will give error messages when converted for delivery to the client system.

Teradata RDBMS for UNIX SQL Reference

5-23
Data Definition

FLOAT, REAL, and DOUBLE PRECISION Numeric Data Types

In the following column definition, SalaryFactor is assigned a Example 5 FLOAT data type:

SalaryFactor FLOAT BETWEEN .1 AND 1E1

The default display format for FLOAT, REAL, and DOUBLE PRECISION is -9.99999999999999E-999.

An example of a FLOAT format is 9.99E99, where 1095 is displayed as 1.09E03.

5-24

Teradata RDBMS for UNIX SQL Reference
Data Definition

Character Data Types

Introduction

Client Character Set

Character Data Types

In general, the CHAR, VARCHAR(n), and LONG VARCHAR data types represent non-numeric, or character, data. Each of these phrases can be combined with a case option (CASESPECIFIC or UPPERCASE) when the data type is declared or modified.

CHAR strings are transmitted between the client system and the Teradata RDBMS as bytes.

On a Teradata RDBMS, output characters are translated to one of the following:

The normal character set of the logon client

The character set defined in the system tables as the default for the logon client (EBCDIC, ASCII, a predefined Japanese character set, or a user-defined character set; query the DBC.HostsInfo and DBC.CharSets views to see the contents of the system tables).

If an application relies on the DBC.Hosts table for the default character set name, you must ensure that the initial logon from the IBM (channel-attached) side is in EBCDIC, and for all other platforms, in ASCII; otherwise, the default character set cannot be known to the application before logon.

The character set specified for the current session with the BTEQ [.]SET SESSION CHARSET command or the CLIv2 CHARSET call

On a Japanese character site, only the lowercase simple Latin letters ( a...z) are converted to uppercase.

The following entities are excluded from this function:

non-Latin single byte characters

multibyte characters

any byte indicating a transition between single byte characters and multibyte characters

If the CASESPECIFIC option is defined, conversion to uppercase is not performed, and simple Latin letters (A...Z, a...z) are considered matched only if they are the same letters and the same case.

Note that because simple Latin letters always have the same canonical representation, the effect of converting to uppercase is the same across all the character sets supported by the Teradata RDBMS.

Teradata RDBMS for UNIX SQL Reference

5-25
Data Definition

Character Data Types

Table 5-5

Effect of Converting to Uppercase on Japanese Character Data

The effect of the uppercase function on various Japanese characters is illustrated in the following table.
Previous << 1 .. 35 36 37 38 39 40 < 41 > 42 43 44 45 46 47 .. 241 >> Next