On 9/18/01 8:01 AM, Chris Johnson at [EMAIL PROTECTED] wrote:

> On Sun, Sep 16, 2001 at 02:11:20PM -0700, Jim Dickenson wrote:
>> Does anyone have an opinion about the following? Are people using decimal
>> type fields? Is it important for the database to allow only allowed data?
> 
> I use decimal datatype fields all the time for my monetary amounts.  I've
> always treated them as behaving the way you suggest they should behave, i.e.
> no extra digit space is provided by using the sign location.  That MySQL
> behaves otherwise seems a bit counter-intuitive.  I design my tables and
> software to treat it otherwise and also to never expect the database to
> provide the limits.  My software insures the limits are never reached.

This is fine if you know what the table is to look like but if you use ODBC
to find out what a field's characteristics are then you are in trouble if
you do not want to code a special case for MyODBC. In PostgreSQL and MySQL a
numeric(10,3) both return precision of 10 and scale of 3 as expected, now
that MyODBC has been fixed. The problem is that a number that is in the
MySQL database might be a magnitude of 10 times larger than a number that is
in the PostgreSQL database.
-- 
Jim Dickenson
mailto:[EMAIL PROTECTED]

Computers for Marketing Corporation
http://www.cfmc.com/

eFax: 1-419-791-8924


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to