AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi Rundungsproblem mit MySQL
Thema durchsuchen
Ansicht
Themen-Optionen

Rundungsproblem mit MySQL

Ein Thema von Angel4585 · begonnen am 26. Apr 2006 · letzter Beitrag vom 27. Apr 2006
Antwort Antwort
Benutzerbild von Sharky
Sharky

Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.259 Beiträge
 
Delphi 2006 Professional
 
#1

Re: Rundungsproblem mit MySQL

  Alt 27. Apr 2006, 08:04
Hai Angel,

hier mal ein Auszug aus der mySQL 5.x Doku:
Zitat:
Using FLOAT might give you some unexpected problems because all calculations in MySQL are
done with double precision. See Section A.5.7, “Solving Problems with No Matching Rows”.
In der deutschen Doku zu mySQL 4.x steht:
Zitat:
Der FLOAT-Typ wird benutzt, um näherungsweise numerische Datentypen zu repräsentieren.
Wenn Du es genau speichern möchtest verwende den Typ DEZIMAL unter angabe der Genauikgeit
Code:
DEZIMAL(10,5)
Eine Dezimalzahl mit 10 Stellen, der übergebene Wert wird auf 5 Stellen nach dem Komma gerundet.

Zitat:
DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL]
A packed “exact” fixed-point number. M is the total number of decimal digits (the precision) and
D is the number of digits after the decimal point (the scale). The decimal point and (for negative
numbers) the ‘-’ sign are not counted in M. If D is 0, values have no decimal point or fractional
part. The maximum number of digits (M) for DECIMAL is 65. The maximum number of supported
decimals (D) is 30. If D is omitted, the default is 0. If M is omitted, the default is 10.
UNSIGNED, if specified, disallows negative values.
All basic calculations (+, -, *, /) with DECIMAL columns are done with a precision of 65
digits.
Stephan B.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:33 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz