Which values are displayed?

Evaluate the SQL statement:
SELECT ROUND(45.953, -1), TRUNC(45.936, 2)
FROM dual;
Which values are displayed?

Evaluate the SQL statement:
SELECT ROUND(45.953, -1), TRUNC(45.936, 2)
FROM dual;
Which values are displayed?

A.
45.95 and 45.93

B.
50 and 45.93

C.
46 and 45

D.
50 and 45.9

E.
46 and 45.93

F.
45 and 45.93

Explanation:

:
ROUND (45.953,-1) will round value to 1 decimal places to the left.
TRUNC (45.936,2) will truncate value to 2 decimal
The answer will be 50 and 45.93
Refer : Introduction to Oracle9i : SQL, Oracle University Student Guide, Single-Row functions, p.
3-13



Leave a Reply 3

Your email address will not be published. Required fields are marked *