There is an ID column in the table with type number (38). When querying in Sqlplus, the query results are displayed in scientific notation:
ID----------4.5572e+184.5574e+184.5585e+18
This does not seem intuitive, and the reason for this is that under Sql*plus, the accuracy of less than or equal to 10 digits is displayed in a very straightforward form, and the more than 10-bit precision is shown in the form of scientific notation.
The following is the test content:
Sql> select * from V$version; BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition release 11.2.0.4.0-64bit productionpl/sql release 11.2.0.4.0-productioncore 11.2.0.4.0 Productiontns for linux:version 11.2.0.4.0-productionnlsrtl Version 11.2.0.4.0-productionsql> CREATE TABLE test (ID Number (20)); sql> INSERT into test values (123456789); sql> INSERT into test values (1234567890); sql> INSERT into test values (12345678901); Sql> commit; Commit complete. Sql> select ID from test; ID----------12345678912345678901.2346e+10sql> Select ID from test where id=1234567890; ID----------1234567890sql> Select ID from test where id=12345678901; ID----------1.2346e+10sql>
Avoid methods that are displayed using scientific notation:
1. Using Set Numwidth
sql> set numwidth 11sql> select ID from test where id=12345678901;
2. Turn number to char type
Toad and PL/SQL developer also have this display problem, by default the Numwidth settings for both tools are 15, but also give us some of the same, can be done by the following methods:
->view->option->data->display large number in scientific notation in toad, this option is not selected
->tools->preferences->sql windows->number fields ToChar in PL/SQL developer, select this option
Scientific counting display problem for long number type numbers in Oracle