Oracle
1Z0-007 · Question #56
Evaluate the SQL statement: SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?
The correct answer is C. 50 and 45.93. 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
Using Functions (Single-Row, Group, Conversion, Conditional)
Question
Evaluate the SQL statement:
SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?
Options
- A46 and 45
- B46 and 45.93
- C50 and 45.93
- D50 and 45.9
- E45 and 45.93
- F45.95 and 45.93
How the community answered
(27 responses)- A15% (4)
- B7% (2)
- C70% (19)
- D4% (1)
- F4% (1)
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
Topics
#ROUND#TRUNC#numeric functions#negative precision
Community Discussion
No community discussion yet for this question.