Oracle Database 12c: SQL Fundamentals — Question 47
Which SQL statements would display the value 1890.55 as $1, 890.55? (Choose three.)
Answer options
- A. SELECT TO_CHAR(1890.55, '$0G000D00')FROM DUAL;
- B. SELECT TO_CHAR(1890.55, '$9, 999V99')FROM DUAL;
- C. SELECT TO_CHAR(1890.55, '$99, 999D99')FROM DUAL;
- D. SELECT TO_CHAR(1890.55, '$99G999D00')FROM DUAL;
- E. SELECT TO_CHAR(1890.55, '$99G999D99')FROM DUAL;
Correct answer: A, D, E
Explanation
The correct options A, D, and E properly format the number to include a dollar sign, commas for thousands, and correctly position the decimal. Option B and C do not use the appropriate format models to display the desired output, either by not including the correct group separator or decimal representation.