Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> Help:Number data type

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Help:Number data type
 sathish  Posted: Dec 26, 2006 03:41:25 AM

 Total Post: 47
 Joined: Mar, 2006






 wat is maximum value possible in this
declaration number(2,2)

i have tried to insert the follwoing values ....
any on explain me.

values output

1 N
12 N
123 N
1234 N
0.1 Y
0.12 Y
.
.
.
0.123456789 Y

Here N - error
Y - successfully inserted

 maddy
Posted: Dec 26, 2006 06:23:07 AM  

 Total Post: 18
 Joined: Aug, 2006






 
u can only insert decimal values
ie.. u declared 2 has the scale and 2 has the precision and it says that it can hold 2 numbers and both must be of precision and it does not hold any scale value and it holds n number of values after decimal becoz it rounds of the value....

 maddy
Posted: Dec 26, 2006 06:23:21 AM  

 Total Post: 18
 Joined: Aug, 2006






 
u can only insert decimal values
ie.. u declared 2 has the scale and 2 has the precision and it says that it can hold 2 numbers and both must be of precision and it does not hold any scale value and it holds n number of values after decimal becoz it rounds of the value....

 sathish
Posted: Dec 26, 2006 10:03:26 PM  

 Total Post: 47
 Joined: Mar, 2006






 

Anyone explain
Briefly with some other example.

 mampi
Posted: Dec 28, 2006 05:52:35 AM  

 Total Post: 3
 Joined: Dec, 2006






 
suppose u give number(4,2).
then if u wanna insert 1234.23 it 'll give an error.because there should be 2 nos before decimal and 2 nos afterit.
but if u insert 25.356 it will insert the value and it'll be stored as 25.36 i.e. it is round of.u give as 10 no s after decimal it'll not show any error.but it will store ultimately only 2 values.clear!

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi333
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software