1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 224


Examine this list of queries:

Which two statements are true? (Choose two.)

Show Answer
Correct Answer: ABD

To understand which statements are true, let's break down the SQL functions and their behaviors in the provided queries. 1. SELECT ROUND(TRUNC(15.193, 1)) FROM DUAL: TRUNC(15.193, 1) truncates the value to a single decimal place, resulting in 15.1. ROUND(15.1) then rounds this truncated value, leaving it as 15. 2. SELECT ROUND(15.193, -1) FROM DUAL: ROUND(15.193, -1) rounds the value to the nearest 10, resulting in 20. 3. SELECT TRUNC(15.193, -1) FROM DUAL: TRUNC(15.193, -1) truncates the value to the nearest 10 without rounding, resulting in 10. 4. SELECT TRUNC(ROUND(15.193, 1)) FROM DUAL: ROUND(15.193, 1) rounds the original value to a single decimal place, resulting in 15.2. TRUNC(15.2) then truncates this value, leaving it as 15. From the above analysis, it's evident that 2 returns the value 20, and 1 and 4 give the same result.

Discussion

6 comments
Sign in to comment
zouveOptions: BD
Jul 3, 2023

BD tested SELECT ROUND (TRUNC (15.193, 1)) "Results" FROM DUAL; SELECT ROUND (15.193, -1) "Results" FROM DUAL; SELECT TRUNC (15.193, -1) "Results" FROM DUAL; SELECT TRUNC (ROUND (15.193, 1)) "Results" FROM DUAL;

lucemqyOptions: BD
Nov 15, 2023

BD is correct

CMjerOptions: BD
May 31, 2023

Checked, B, D is correct

musafirOptions: BD
Jun 20, 2023

B, D Correct tested in Oracle

ShrimathiOptions: BD
Jul 19, 2023

Answer B,D

ArslanAltaf
May 11, 2024

15,20,10,15 is result