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

How One can easily select all even, odd, or Nth rows from a table using SQL queries?

4 Answers  


a. Can you delete data from a View. b. If Yes, can you delete it if there are multiple tables c. If No, can you delete if there is single source table which is joining.

4 Answers   CGI, IBM,


How to use sql*plus built-in timers?

0 Answers  


What are different types of sql?

0 Answers  


what is meant by urlencode and urldocode? : Sql dba

0 Answers  






Should I use mbr or gpt?

0 Answers  


When can we use the where clause and the having clause?

0 Answers  


Is sql port 1433 encrypted?

0 Answers  


HOW TO ADD PRIMARY KEY TO TABLE BY PL/SQL PROGRAM

3 Answers  


how to check myisam tables for errors? : Sql dba

0 Answers  


Why do you partition data?

0 Answers  


What is a left inner join?

0 Answers  


Categories