Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / SQL PLUS Session Environment
 

Set numformat

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.