5. Which SQL statements wocould display the value 1890.55 as $1,890.55? (Choose three .)
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,999 d99 ')
From dual;
D. Select to_char (1890.55, '$99g999d00 ')
From dual;
E. Select to_char (1890.55, '$99g999d99 ')
From dual;
Answer: Ade
Question Analysis:
G (group) is the group separator ','
D (decimal point) is the decimal point
V indicates the number of digits that move the decimal point to the right, such as to_char (10.5, '99v999') '123'
0 indicates completion. If there is no number at this position, 0 is filled. It is different from 9. If there is no number at this position, leave it blank. For example, to_char (1000, '123') '123 ',
WhileTo_char (1000, '20140901') '20160301 '.
From the above we can see that B is wrong.
C option select to_char (1890.55, '$99,999 d99') from dual;
This error is caused by the previous GroupThe Delimiter is a symbol, and the decimal point is followed by a letter. In this case, an error is returned, which can be changed to the same
Select to_char (1890.55, '$99,999.99') from dual;
Or
Select to_char (1890.55, '$ 99g999d99') from dual;
Are correct.