Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 102

Examine this query:

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

What is the result?

    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
yaya32Option: B

Answer is B

andrejshilin16

TRUNCATE here do nothing

tjswegOption: B

can someone explain why the answer is 200?

Mcromeo

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

zouveOption: B

B is the correct tested

CMjerOption: B

B is correct, run it in SQL Developer

AbdullaMA2Option: A

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

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

Rik92Option: B

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

lucemqyOption: B

Answer is 200

metallersOption: B

Respuesta revisada

Ac37Option: B

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