1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 102


Examine this query:

SELECT TRUNC(ROUND(156.00,-2),-1) FROM DUAL;

What is the result?

Show Answer
Correct Answer: B

The ROUND function with a precision of -2 rounds the number 156.00 to the nearest hundred, resulting in 200. The TRUNC function with a precision of -1 then truncates the number 200 to the nearest ten, which still results in 200. Therefore, the final result of the SQL query is 200.

Discussion

9 comments
Sign in to comment
Rik92Option: B
Feb 22, 2023

TRUNC does nothing here. The rounding of -2 gives closest order of 100, 156->200. Then 200 is truncated to 200

AbdullaMA2Option: A
Mar 22, 2023

A is the right one : The ROUND(156.00, -2) function call rounds the number 156.00 to the nearest hundredth, resulting in the value 200. The TRUNC(200, -1) function call truncates the number 200 to the nearest ten, resulting in the value 150. Therefore, the final result of the SQL query is 150.

Fargo01
Mar 26, 2024

Just run the query and you'll get the result : 200.

CMjerOption: B
May 18, 2023

B is correct, run it in SQL Developer

zouveOption: B
Jun 24, 2023

B is the correct tested

tjswegOption: B
Aug 28, 2023

can someone explain why the answer is 200?

Mcromeo
Oct 3, 2023

because ROUND(156.00,-2) = 200 and trunc(200,-1)=200 (-1 => first number before coma 0 is trunced to 0)

yaya32Option: B
Jan 17, 2024

Answer is B

andrejshilin16
Jul 20, 2024

TRUNCATE here do nothing

Ac37Option: B
Mar 27, 2023

I have run it in oracle and the answer is 200.

metallersOption: B
Oct 23, 2023

Respuesta revisada

lucemqyOption: B
Nov 14, 2023

Answer is 200