Oracle Database SQL — Question 263
Which is true about the ROUND, TRUNC and MOD functions?
Answer options
- A. TRUNC(MOD(25,3),-1) is invalid.
- B. ROUND(MOD(25,3),-1) is invalid.
- C. ROUND(MOD(25,3),-1) and TRUNC(MOD(25,3),-1) are both valid and give the same result.
- D. ROUND(MOD(25,3),-1) and TRUNC(MOD(25,3),-1) are both valid but give different results.
Correct answer: C
Explanation
The correct answer is C because both ROUND and TRUNC functions can operate on the result of MOD(25,3) with a negative precision of -1, producing the same result. Options A and B are incorrect because neither function is invalid in this context, and option D is incorrect as both functions yield the same value when applied to the result of MOD(25,3).