db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Bounds (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings have zero scale
Date Fri, 30 Sep 2005 13:55:48 GMT
    [ http://issues.apache.org/jira/browse/DDLUTILS-20?page=comments#action_12330958 ] 

Richard Bounds commented on DDLUTILS-20:

I think the problem is that when you specify a precision without a scale, it implicitly specifies
a scale of 0 (e.g. look at the top 2 rows in the table).

When I try this on my Oracle 10g database:

CREATE TABLE testnumber
    num NUMBER(38)
insert into testnumber values(1.5);
select num from testnumber;

I get back '2', not '1.5'. When I specify the type as:

CREATE TABLE testnumber
    num NUMBER

I get back the correct value. Unfortunately I haven't got an Oracle 8 database to try it on.

> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>          Key: DDLUTILS-20
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-20
>      Project: DdlUtils
>         Type: Bug
>     Reporter: Richard Bounds
>     Assignee: Thomas Dudziak

> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to
Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified
either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message