Mega Code Archive

 
Categories / Oracle PLSQL / SQL Plus
 

Use numformat to control the number format

SQL> 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> SQL> set numformat 99999999999999999999.99999999999999 SQL> /                            MY_COLUMN ------------------------------------            1234567890.00000000000000           12345678901.00000000000000  12345678901234567890.00000000000000 3 rows selected. SQL> select * from t;                            MY_COLUMN ------------------------------------            1234567890.00000000000000           12345678901.00000000000000  12345678901234567890.00000000000000 3 rows selected. SQL> SQL> set numformat "" SQL> /  MY_COLUMN ---------- 1234567890 1.2346E+10 1.2346E+19 3 rows selected. SQL> select * from t;  MY_COLUMN ---------- 1234567890 1.2346E+10 1.2346E+19 3 rows selected. SQL> SQL> drop table t; Table dropped.