set numformat : numformat « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






The default value for NUMFORMAT is 10.

SQL*Plus will try to fit all the number data in 10 spaces of output if NUMFORMAT is 10.

SQL> create table t( my_column number );

Table created.

SQL>
SQL> insert into t values ( 1234567890 );

1 row created.

SQL> insert into t values ( 12345678901 );

1 row created.

SQL> insert into t values ( 12345678901234567890 );

1 row created.

SQL>
SQL> select * from t;


 MY_COLUMN
----------
1234567890
1.2346E+10
1.2346E+19

3 rows selected.

SQL> set numformat 99999999999999999999.99999999999999;
SQL>
SQL> select * from t;


                           MY_COLUMN
------------------------------------
           1234567890.00000000000000
          12345678901.00000000000000
 12345678901234567890.00000000000000

3 rows selected.

SQL> set numformat "";
SQL>
SQL> select * from t;


 MY_COLUMN
----------
1234567890
1.2346E+10
1.2346E+19

3 rows selected.

SQL> drop table t;

Table dropped.








29.17.numformat
29.17.1.set numformat
29.17.2.set numformat 09999.99
29.17.3.set numformat 99999