Evaluate the SQL statement:
SELECT ROUND(45.953, -1), TRUNC(45.936, 2)
FROM dual;
Which values are displayed?
A.
46 and 45
B.
46 and 45.93
C.
50 and 45.93
D.
50 and 45.9
E.
45 and 45.93
F.
45.95 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
Incorrect Answers:
A:
Does not meet round and truncate functions
B:
Does not meet round functions
D:
Does not meet truncate functions
E:
Does not meet round functions
F:
Does not meet round functions
Refer: Introduction to Oracle9i: SQL, Oracle University Student Guide, Single-Row functions, p. 3-13