From: Date: December 3 2003 8:24am Subject: Re: Money data type in MySQL? List-Archive: http://lists.mysql.com/mysql/154921 Message-Id: <5.2.0.9.0.20031203022147.0233f0b8@198.52.32.246> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed At 02:03 2003-12-03, David Garamond wrote: >What do people recommend for storing money amounts? I've seen people use >NUMERIC(18,3) and other use NUMERIC(18,4). Which one is more appropriate >and why? This is considering various existing currencies, some having low >rates (like IDR, in which you can have large amount up to hundreds of >trillions) and some high rates (like USD, in which you can have small >amount like 0.1 cent). Are there places/industries which involve values >lower than 0.1 cent? Off the top of my head: currency trading. >And what about 'factor' field in currency conversion table? Should I use >FLOAT, or DOUBLE (do we need 15-16 digit precision?) or NUMERIC (exact >numbers). It _really_ depends on Your/ Your application needs. I'd hazard a guess that for most situations FLOAT should do just fine. >The factor should range between 1E-3 (e.g. converting IDR to USD) to 1E4 >(e.g. converting IDR to pounds/euros). > >-- >dave > > > >-- >MySQL General Mailing List >For list archives: http://lists.mysql.com/mysql >To unsubscribe: http://lists.mysql.com/mysql?unsub=engine2@stripped