sam wun wrote:
I created a Transaction table with a field Cost which is a Float type with only 2 precision eg. 123.01.
When I use the following sql statement to make a sum of this field, it returned a Float number with more than 2 precision numbers
If I should not use Float type for the Cost field, what type should I use?
For currency fields, I use DECIMAL. See: <http://dev.mysql.com/doc/mysql/en/Numeric_type_overview.html>
HTH! -- Hassan Schroeder ----------------------------- [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]