On Wednesday 05 May 2004 09:48 am, scott.marlowe wrote:
> Just try this simple test in MySQL and see if the boss still thinks it's
> suitable for accounting:
>
> mysql> create table test (i1 int, n1 numeric(8,2));
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> insert into test values (10000000000000,100000000000.345678);
> Query OK, 1 row affected (0.00 sec)
>
> mysql> select * from test;
> +------------+------------+
>
> | i1 | n1 |
>
> +------------+------------+
>
> | 2147483647 | 9999999.99 |
>
> +------------+------------+
> 1 row in set (0.00 sec)
>
>
> Wow, inspires you with confidence, huh?
>
Just to describe what SHOULD happen in a real database:
jonagard=# create table test (i1 int, n1 numeric(8,2));
CREATE TABLE
jonagard=# insert into test values (10000000000000,100000000000.345678);
ERROR: int8 conversion to int4 is out of range
--
Jonathan Gardner
jgardner@jonathangardner.net