nerdexam
Oracle

1Z0-061 · Question #217

Evaluate the SQL statement: SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?

The correct answer is C. 50 and 45.93. ROUND (45.953, -1) will round value to 1 decimal places to the left. TRUNC (45.936, 2) will truncate value to 2 decimal The answer will be 50 and 45.93

Using Single-Row Functions to Customize Output

Question

Evaluate the SQL statement:

SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?

Options

  • A46 and 45
  • B46 and 45.93
  • C50 and 45.93
  • D50 and 45.9
  • E45 and 45.93
  • F45.95 and 45.93

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    3% (1)
  • C
    79% (23)
  • F
    10% (3)

Explanation

ROUND (45.953, -1) will round value to 1 decimal places to the left. TRUNC (45.936, 2) will truncate value to 2 decimal The answer will be 50 and 45.93

Topics

#ROUND function#TRUNC function#numeric functions#negative precision

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice