Re: How many pre-decimal positions/integer digits has a DECimal (5,3) defined field ?

From: Tibor Karaszi <tibor_please.no.email_karaszi_at_hotmail.nomail.com>
Date: Sat, 9 Oct 2004 10:13:40 +0200
Message-ID: <#fBCgfdrEHA.2924_at_TK2MSFTNGP12.phx.gbl>


Yes, but page 125 states that for DECIMAL, the product can give you a higher precision than asked for:

23) DECIMAL specifies the data type exact numeric, with the decimal scale specified by the <scale>

and the implementation-defined decimal precision equal to or greater than the value of the

specified <precision>.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


"Knut Stolze" <stolze_at_de.ibm.com> wrote in message news:ck75f2$6dd$1_at_fsuj29.rz.uni-jena.de...

> Alex Filonov wrote:
>
>> peterb_at_gmx.net (Peter Blatt) wrote in message
>> news:<ck4ale$n5t$00$1_at_news.t-online.com>...
>>> Does 5 represent the total numer of digits (including the fractional
>>> portion) or only the number of places BEFORE the decimal point? Moreover
>>> does the number include the decimal point?
>
> According to the SQL standard (SQL99), subclause 4.5.1 (page 22) says:
> -----------------
> An exact numeric value has a precision and a scale. The precision is a
> positive integer that determines the number of significant digits in a
> particular radix (binary or decimal). The scale is a non-negative integer.
> A scale of 0 (zero) indicates that the number is an integer. For a scale
> of S, the exact numeric value is the integer value of the significant
> digits multiplied by 10^(-s).
> -----------------
>
> That makes it absolutely clear that for SQL database systems the precision
> (5 in the example above) is the total number of digits, including the
> fractional portion and without the decimal character.
>
> --
> Knut Stolze
> Information Integration
> IBM Germany / University of Jena
Received on Sat Oct 09 2004 - 10:13:40 CEST

Original text of this message