Tuesday, January 25, 2011

NUMWIDTH


You can use NUMWIDTH to prevent large numbers being displayed in scientific notation. First check the current value of NUMWIDTH:

SQL> show numwidth
numwidth 10
SQL>

Next, display a large number. As it is more than NUMWIDTH digits long, it appears in scientific notation:

SQL> select sum(bytes) from dba_data_files;

SUM(BYTES)
----------
1.2863E+11

SQL>

This will need a NUMWIDTH of 12 or more to be displayed as a normal number:

SQL> set numwidth 12
SQL> l
  1* select sum(bytes) from dba_data_files
SQL> /

  SUM(BYTES)
------------
128625672192

SQL>

No comments:

Post a Comment