Make edits for accuracy and clarity
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/a3d2653f Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/a3d2653f Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/a3d2653f Branch: refs/heads/master Commit: a3d2653fab85b6780bfd8093a73a2cf965df7a58 Parents: 477330e Author: liu.yu <[email protected]> Authored: Tue Jul 10 17:52:29 2018 +0800 Committer: liu.yu <[email protected]> Committed: Tue Jul 10 17:52:29 2018 +0800 ---------------------------------------------------------------------- .../src/asciidoc/_chapters/sql_language_elements.adoc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/a3d2653f/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc ---------------------------------------------------------------------- diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc index 8093145..72a6052 100644 --- a/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc +++ b/docs/sql_reference/src/asciidoc/_chapters/sql_language_elements.adoc @@ -372,7 +372,7 @@ stored in 2, 4, or 8 bytes depending on number of digits^2^ .2+| LOB Data Types .2+| LOB | BLOB | Binary Large Object .2+| 10G â no limit + Currently the limit defaults to 10G. This limit can be configured as needed using the CQD `LOB_MAX_SIZE`. | CLOB | Character Large Object -.10+| Numeric Data Types .5+| Numeric | NUMERIC (1,_scale_) to + NUMERIC (128,_scale_) | Binary number with optional scale; signed or unsigned for 1 to 9 digits +.10+| Numeric Data Types .5+| Numeric^6^ ^7^ | NUMERIC (1,_scale_) to + NUMERIC (128,_scale_) | Binary number with optional scale; signed or unsigned for 1 to 9 digits | 1 to 128 digits; + stored: + 1 to 4 digits in 2 bytes + @@ -383,17 +383,16 @@ depending on precision | SMALLINT | Binary integer; signed or unsigned | 0 to 65535 unsigned, -32768 to +32767 signed; stored in 2 bytes | INTEGER | Binary integer; signed or unsigned | 0 to 4294967295 unsigned, -2147483648 to +2147483647 signed; stored in 4 bytes | LARGEINT | Binary integer; signed only | -2^63^ to +(2^63^)-1; stored in 8 bytes -|Numeric (extended numeric precision) | NUMERIC (precision 19 to 128) | Binary integer; signed or unsigned | Stored as multiple chunks of 16-bit integers, with a minimum storage +|Numeric (extended numeric precision)^7^ | NUMERIC (precision 19 to 128) | Binary integer; signed or unsigned | Stored as multiple chunks of 16-bit integers, with a minimum storage length of 8 bytes. -.3+| Floating point number | FLOAT[(_precision_)] | Floating point number; precision designates from 1 through 52 bits of precision | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes +.3+| Floating point number^7^ | FLOAT[(_precision_)] | Floating point number; precision designates from 1 through 52 bits of precision | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes | REAL | Floating point number (32 bits) | +/- 1.17549435e-38 through +/ 3.40282347e+38; stored in 4 bytes | DOUBLE PRECISION | Floating-point numbers (64 bits) with 1 through 52 bits of precision (52 bits of binary precision and 1 bits of exponent) | +/- 2.2250738585072014e-308 through +/-1.7976931348623157e+308; stored in 8 bytes -| Decimal number | DECIMAL (1,_scale_) to DECIMAL (18,_scale_) | Decimal number with optional scale; stored as ASCII characters; signed or unsigned for 1 to 9 digits; signed required for 10 or more digits +| Decimal number^6^ | DECIMAL (1,_scale_) to DECIMAL (18,_scale_) | Decimal number with optional scale; stored as ASCII characters; signed or unsigned for 1 to 9 digits; signed required for 10 or more digits | 1 to 18 digits. Byte length equals the number of digits. Sign is stored as the first bit of the leftmost byte. |=== -* _scale_ is the number of digits to the right of the decimal. -* _precision_ specifies the allowed number of decimal digits. +TIP: 1. The size of a column that allows null values is 2 bytes larger than the size for the defined data type. 2. The maximum number of characters depends on the character set. @@ -409,6 +408,8 @@ length of 8 bytes. 4. Storage size is reduced by 4 bytes for storage of the varying character length field. 5. The maximum number of digits in an INTERVAL value is 18, including the digits in all INTERVAL fields of the value. Any INTERVAL field that is a starting field can have up to 18 digits minus the number of other digits in the INTERVAL value. +6. _scale_ is the number of digits to the right of the decimal. +7. _precision_ specifies the allowed number of decimal digits. <<< [[comparable_and_compatible_data_types]]
