Home » SQL & PL/SQL » SQL & PL/SQL » how do i store the value 123.50 as it is in oracle
how do i store the value 123.50 as it is in oracle [message #18696] Mon, 11 February 2002 07:05 Go to next message
ksr
Messages: 112
Registered: January 2002
Senior Member
Hi,
i have a table like
table1(col1 number)

I have issued : insert into table1 values(123.50);

But when i say select * from table1; it returns me
col1
----
123.5

How do i save the data in the column as it is like 123.50
Re: how do i store the value 123.50 as it is in oracle [message #18698 is a reply to message #18696] Mon, 11 February 2002 07:25 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
hi,

you can not change the way oracle stores number.so if u want to see trailing zeros, then use

select to_char(col_name,'999.90') from your_table
/

cheers
pratap
Re: how do i store the value 123.50 as it is in oracle [message #18701 is a reply to message #18696] Mon, 11 February 2002 07:39 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
another way..

SQL>set numformat 99999.99

SQL> create table tab1(n number);

Table created.

SQL> insert into tab1 values(123.50);

1 row created.

SQL> select * from tab1;

N
---------
123.50
Previous Topic: HOW TO WRITE A REQUEST IN ONE LINE WITH COMMENTS?
Next Topic: output parameters in stored procedure
Goto Forum:
  


Current Time: Thu Aug 06 02:38:28 CDT 2020