oracle to

    技术2022-06-24  45

    参考:http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm#i34510 SELECT TO_CHAR(number, 'fmt') FROM DUAL;

     

    Table 1-1:Results of Number Conversions

    ※Ps:

    FM:Returns a value with no leading or trailing blanks.

    number 'fmt' Result

    -1234567890

    9999999999S

    '1234567890-'

    0

    99.99

    ' .00'

    +0.1

    99.99

    ' .10'

    -0.2

    99.99

    ' -.20'

    0

    90.99

    ' 0.00'

    +0.1

    90.99

    ' 0.10'

    -0.2

    90.99

    ' -0.20'

    0

    9999

    ' 0'

    1

    9999

    ' 1'

    0

    B9999

    ' '

    1

    B9999

    ' 1'

    0

    B90.99

    ' '

    +123.456

    999.999

    ' 123.456'

    -123.456

    999.999

    '-123.456'

    +123.456

    FM999.009

    '123.456'

    +123.456

    9.9EEEE

    ' 1.2E+02'

    +1E+123

    9.9EEEE

    ' 1.0E+123'

    +123.456

    FM9.9EEEE

    '1.2E+02'

    +123.45

    FM999.009

    '123.45'

    +123.0

    FM999.009

    '123.00'

    +123.45

    L999.99

    ' $123.45'

    +123.45

    FML999.99

    '$123.45'

    +1234567890

    9999999999S

    '1234567890+'


    最新回复(0)