Re: Oracle-Number werden tlw. als Zahl/Double erstellt

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hallo Josef!

Ist NUMBER ohne Größenangabe überhaupt identisch mit NUMBER(*,0)?

Offenbar nicht zu 100%. Die Doku sagt dazu folgendes:

"Numbers of virtually any magnitude can be stored (...), up to 38 digits of precision. (...) Optionally, you can also specify a precision (total number of digits) and scale (number of digits to the right of the decimal point). (...) If a precision is not specified, the column stores values as given. If no scale is specified, the scale is zero."

Ich würde dem DB-Entwickler trotzdem ein wenig auf die Finger klopfen,
weil er unterschiedliche Deklarationen verwendet. ;-)

Wink verstanden. ;-) Wobei ich in diesem Fall eine Teilschuld an den SQL-Developer weiterreichen kann, der wohl in unterschiedlichen Versionen unterschiedliche DDL-Anweisungen für ein Number-Feld ohne jegliche Dimensionierung erstellt hat.

Notfalls müsstest du ein neues Feld einfügen und die Daten kopieren.
Was bei einem PK- bzw. UniqueIndex-Feld natürlich lästig wird, wenn es
bereits für Fremdschlüsselfelder verwendet wird.

Da es sich bei dem im Beispiel genannten Tabellen um Schlüssellisten im System handelt, gibt es natürlich zigfache Foreign Keys auf die Spalten. Für das Produktivsystem scheidet dieser Weg daher aus.

Aber ich ziehe mal das selbe Fazit wie du, und werde meine Kollegen anhalten, zukünftig nur noch explizit dimensionierte Felder zu erstellen.

Danke für den aufschlussreichen Austausch,
Stefan
.



Relevant Pages

  • Re: Monetary calculations in CL
    ... things like yield rates that specify a number of places of precision and ... round the 13th (by implication do not employ precision to more than the ... calculations can easily consume 20 or more significant digits. ... of places of significance and the rounding policy are supplied. ...
    (comp.lang.lisp)
  • Re: SELECTED_REAL_KIND clarification plse
    ... sign, would satisfy four digits. ... There is work toward a decimal based floating point standard ... available precision and range as binary. ... It would make sense to specify ...
    (comp.lang.fortran)
  • Re: example of KIND to replace DOUBLE PRECISION
    ... in fixed form mode rather than free form? ... isn't guaranteed to be double precision. ... The purpose of the KIND system is to allow you to specify what ... is likely to get you 26 digits of precision on a machine whose ...
    (comp.lang.fortran)
  • RE: calculation accuracy
    ... also properly specify the literal as double precision, ... only 8 digits of it. ... Can we have a standardized way to specify pi? ...
    (comp.lang.fortran)
  • Re: calculation accuracy
    ... also properly specify the literal as double precision, ... only 8 digits of it. ... It isn't as though the compiler is going to be able ... Can we have a standardized way to specify pi? ...
    (comp.lang.fortran)