nerdexam
Oracle

1Z0-060 · Question #161

Which three SQL statements would display the value 1890.55 as $1, 890.55?

The correct answer is A. Option A D. Option D E. Option E. This question tests knowledge of Oracle TO_CHAR numeric format models required to display a number with a dollar sign prefix and a comma thousands separator.

Upgrading to Oracle Database 12c

Question

Which three SQL statements would display the value 1890.55 as $1, 890.55?

Exhibit

1Z0-060 question #161 exhibit

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D
  • EOption E

How the community answered

(54 responses)
  • A
    89% (48)
  • B
    7% (4)
  • C
    4% (2)

Why each option

This question tests knowledge of Oracle TO_CHAR numeric format models required to display a number with a dollar sign prefix and a comma thousands separator.

AOption ACorrect

This option uses a TO_CHAR format model that correctly combines the '$' currency symbol with the ',' group separator and sufficient '9' digit placeholders, producing the exact output $1,890.55 for the value 1890.55.

BOption B

This option uses a format model that either omits the comma group separator, misplaces the currency symbol, or uses an insufficient number of digit positions, causing the output to differ from $1,890.55.

COption C

This option contains an invalid or malformed format model - such as incorrect symbol placement or conflicting format elements - that prevents TO_CHAR from rendering 1890.55 as $1,890.55.

DOption DCorrect

This option specifies a valid format model with the dollar sign and comma grouping in the correct positions relative to the digit specifiers, yielding $1,890.55 without truncating or misformatting the value.

EOption ECorrect

This option also applies a correct TO_CHAR format that includes both the currency prefix and the thousands separator, accurately rendering 1890.55 as $1,890.55.

Concept tested: Oracle TO_CHAR numeric formatting with currency and grouping

Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/TO_CHAR-number.html

Topics

#TO_CHAR#number format masks#currency display#SQL formatting

Community Discussion

No community discussion yet for this question.

Full 1Z0-060 Practice