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.
Question
Which three SQL statements would display the value 1890.55 as $1, 890.55?
Exhibit
Options
- AOption A
- BOption B
- COption C
- DOption D
- EOption E
How the community answered
(54 responses)- A89% (48)
- B7% (4)
- C4% (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.
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.
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.
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.
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.
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
Community Discussion
No community discussion yet for this question.
