QuestionQ8

VerifiedUsing Conversion Functions and Conditional Expressions

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

Question Image

Choose three
Explanation

Oracle's TO_CHAR number format model uses 9 for a zero-suppressed digit, 0 to force digit display, G (or a literal comma) as a floating group/thousands separator, and D as the decimal-point marker, with a leading $ that floats to sit immediately before the first displayed digit. Under these rules, TO_CHAR(1890.55,'$0G000D00'), TO_CHAR(1890.55,'$99,999D99'), and TO_CHAR(1890.55,'$99G999D00') all correctly render 1890.55 as $1,890.55, while any format containing the V element (which scales the value by 10^n and omits the decimal point entirely) cannot produce this output.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!