QuestionQ89Verified/Using Single-Row Functions to Customize OutputCopy linkReport a problemAsk AstroTutorSave questionWhich SQL statements display the value 1890.55 as $1, 890.55?Choose threeASELECT TO_CHAR(1890.55, '$0G000D00')FROM DUAL;BSELECT TO_CHAR(1890.55, '$9, 999V99')FROM DUAL;CSELECT TO_CHAR(1890.55, '$99, 999D99')FROM DUAL;DSELECT TO_CHAR(1890.55, '$99G999D00')FROM DUAL;ESELECT TO_CHAR(1890.55, '$99G999D99')FROM DUAL;Show AnswerAnswerExplanationIn Oracle number format models, G returns the current group separator and D returns the current decimal character. 0 forces zero display where needed, while 9 displays digit positions; both 00 and 99 preserve the two fractional digits of 1890.55. The V element instead multiplies the value by a power of ten, so it does not produce the requested currency representation.Learn moreOracle Database SQL Language Reference — Format ModelsShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion