Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Retaining Trailing Zero In a Number Column?
dave_at_simcik.com said...
> Hey group,
> This is probably a common question, but searching through the docs
> has revealed nothing. If I have a field in my table that is intended
> to be used as a price and I'm using the Number datatype [Number(8,2)],
> how can I keep the trailing zero on my prices (140.50 --> 140.5)?
>
> Any help is much appreciated.
>
> Regards,
> DTS
>
They're really there ... you just have to tell sqlplus what format to
display the number in:
SQL> select 140.50 from dual;
140.50
140.5
1 row selected.
SQL> select to_char(140.50,'999.99') from dual;
TO_CHAR
1 row selected.
-- /Karsten DBA > retired > DBAReceived on Wed Apr 23 2003 - 14:58:00 CDT
![]() |
![]() |