How can I get NUMBER data with mentioned precision value

by Umesh

Hi All,

I have a table test1 with following columns
create table test1( col1 NUMBER(10,4));
I am using ORACLE11g
I have inserted following data to the table

insert into test1 values(100);
insert into test1 values(200.12);
insert into test1 values(300.125);
insert into test1 values(400.7896);

while selecting from table I am getting data in the following way and sending to front end to display in the our application

But I want data in the format of number data i defined while creating table
I mean

How I can achieve this?
Thanks and Regards,

Comments for How can I get NUMBER data with mentioned precision value

Average Rating starstarstarstarstar

Click here to add your own comments

Jul 09, 2015
by: Graegleah

If you you asked the question in programming point of view then to get precision value you can use different kinds of programming language. The most is the C++. So, before use it you must familiar its way of working and more. This is a good platform to get your desire result according to the Code which you have written for the output. On the other hand, I have great skills in it and now try to find out order term paper online but unluckily i could not get any source or website for this purpose.

Jun 12, 2015
Good post
by: Mrs. Orie Williamson

Hello! Many thanks for your site! Thanks for answering!

Apr 24, 2015
chnaging the display format of numbers in Oracle
by: Anonymous

In the Oracle database itself numbers are stored on a format that is independent of how they are displayed. This allows the same number to be displayed in many different ways. For example you might want to separate thousands, or you might want to display whole numbers only or you might want to prefix the number with a currency symbol (eg $, £, €) or suffix with a currency code (eg USD, GBP, HKD). However the number is displayed doesn't affect the way it is stored.

In other words it's up to the application to determine what format a number is displayed in. For example in SQL*Plus if you want to always display numbers with 4 decimal places no matter what precision they have in the database then you specify the column format as 999.9999 (assuming the numbers have no more than 3 digits before the decimal point).

To achieve the same thing in Oracle Application Express (APEX), the display format would be 999d9999. In C you would use printf("%3.4f\n",d); .

In conclusion therefore, the diaplay format mask(s) you need to use depends on your application(s)!

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Oracle Questions.