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

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 8 Oct 2004 10:51:11 -0700
Message-ID: <4b5394b2.0410080951.594fe483_at_posting.google.com>


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?
>
> Are there differences between the databases servers ?
>
> Peter

This question is best asked in comp.databases which I added to the list.
(but GOOGLE doesn't let me set the Follow-up: option)

IF you are asking about SQL databases, then the definition is DECIMAL { (precision[,scale]) ]
where "precision is the total number of significant digits used to express the number; the scale is the number of significant digits to the right of the decimal point"

The quote is not directly from the standard. It's from SQL Instant Reference published by SYBEX (C1993 so it is getting a little old).

For your last question, it seems database servers that claim to support SQL would have to adhere to that definition.

HTH, both you and other readers.
  Ed Received on Fri Oct 08 2004 - 19:51:11 CEST

Original text of this message