25.67,-1
Trunc = 20
Round= 30

HOW????

Answers were Sorted based on User's Feedback



25.67,-1 Trunc = 20 Round= 30 HOW????..

Answer / chandu

select trunc(25.67,-1),round(30) from dual;

TRUNC(25.67,-1) ROUND(30)
--------------- ----------
20 30

Is This Answer Correct ?    3 Yes 3 No

25.67,-1 Trunc = 20 Round= 30 HOW????..

Answer / gaurav

The TRUNC (n1, n2) function returns n1 truncated to n2 decimal places. If n2 is omitted, then n1 is truncated to 0 places. n2 can be negative to truncate (make zero) n2 digits left of the decimal point.

if you do it -2. answer will be zero in this case.

similar thing goes for round.It will become zero.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

write a query to find out the no. of employees whose age is less than 25 and max of salary for the employees belonging to a particular department is less than 20000

6 Answers  


What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?

2 Answers   JDA,


What are the types of variables use in pl sql?

0 Answers  


What are analytic functions in sql?

0 Answers  


What is a 'instead of trigger'?

3 Answers   Eenadu, TCS,






what is sql? : Sql dba

0 Answers  


Why do we use procedures?

0 Answers  


what is a database transaction? : Sql dba

0 Answers  


What is data abstraction in sql?

0 Answers  


Is sql a backend language?

0 Answers  


What are some predefined exceptions in pl/sql?

0 Answers  


What is numeric function sql?

0 Answers  


Categories