Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Number or Decimal?
Brian Peasland wrote:
> dataman wrote:
> > Which is more efficient?
>
> Please define "efficient"?
>
> Also, be advised, Oracle only has the NUMBER decimal type for storing
> numeric values in the database. There is no DECIMAL datatype.
>
>
> HTH,
>
> Brian
>
>
> --
> ===================================================================
>
> Brian Peasland
> dba_at_nospam.peasland.net
> http://www.peasland.net
>
There is DECIMAL datatype:
SQL> select banner from v$version;
BANNER
SQL> declare
2 x decimal;
3 begin
4 x := 12345678;
5 end;
6 /
PL/SQL procedure successfully completed.
SQL> create table test (x decimal);
Table created.
However, this doesn't change anything as DECIMAL(p,s) is actually NUMBER(p,0) (scale can't be non-zero.) So the answer to the OP's question is: there's no difference between the two except that DECIMAL's scale is constrained to 0. See the SQL Reference, paragraph named "ANSI, DB2 and SQL/DS Datatypes" for more information about supported non-Oracle datatypes and their mappings to Oracle datatypes.
Regards,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Received on Tue Sep 12 2006 - 05:34:38 CDT
![]() |
![]() |