The round(23.59384,-2) is giving output as 0. Can any one explain ,why it was 0?

Questions by venkatesh   answers by venkatesh

Showing Answers 1 - 5 of 5 Answers

Sivaramasamy

  • Apr 26th, 2006
 

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

Siva

  Was this answer useful?  Yes

sudheer_ml

  • Apr 26th, 2006
 

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

  Was this answer useful?  Yes

pramod

  • Oct 22nd, 2007
 

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions