GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 20 of 81    Print  
The round(23.59384,-2) is giving output as 0. Can any one explain ,why it was 0?

  
Total Answers and Comments: 3 Last Update: October 22, 2007     Asked by: venkatesh 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 26, 2006 02:02:31   #1  
Sivaramasamy        

RE: The round(23.59384,-2) is giving output as 0. Can ...

Round(23.59384 0) giving output as integer. If it is -ve it will treat the respective position value as 0.

Siva


 
Is this answer useful? Yes | No
April 26, 2006 06:03:54   #2  
sudheer_ml Member Since: March 2006   Contribution: 1    

RE: The round(23.59384,-2) is giving output as 0. Can ...

as in u'r comment second prameter is negative so it will count 2 digit from decimal point to left side .i.e 23

this 23 is less than 50 so it will round it zero.

if u take above 50 it will round it to 100

for example;

sql> select round(88.59384 -2) from dual;

ROUND(88.59384 -2)
------------------
100


 
Is this answer useful? Yes | No
October 22, 2007 04:12:02   #3  
pramod        

RE: The round(23.59384,-2) is giving output as 0. Can ...
In the above code '-2' specifies that the only two digits before the decinmal points needs rounding up.
and '+2' would mean two digits after the decimal point.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape