What would be the outcome?

Evaluate the following query:
SQL> SELECT TRUNC(ROUND(156.00, -1), -1)
FROM DUAL;
What would be the outcome?

Evaluate the following query:
SQL> SELECT TRUNC(ROUND(156.00, -1), -1)
FROM DUAL;
What would be the outcome?

A.
16

B.
100

C.
160

D.
200

E.
150

Explanation:

Function Purpose
ROUND(column|expression, n) Rounds the column, expression, or value to n decimal places or, if
n is omitted, no decimal places (If n is negative, numbers to the left of decimal point are rounded.)
TRUNC(column|expression, n) Truncates the column, expression, or value to n decimal places or,
if n is omitted, n defaults to zero



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Sergio

Sergio

ROUND (156.00, -1) = 160

TRUNC (160.00, -1) = 160

Sergio

Sergio

Well, it would be TRUNC (160,-1) instead of TRUNC (160.00,-1), but the answer is the same.