问题
We have a table with a 'price' field of type NUMBER(20,7)
.. In TOAD I do this:
update mytable set price = 1234567890123.1234567;
Then I do this select:
select price, to_char(price) from mytable
PRICE TO_CHAR(PRICE)
1234567890123.12 "1234567890123.1234567"
Question is, why does TOAD truncate the result when displaying the NUMBER(20,7) field? The data is obviously there as it prints out with to_char.
??
回答1:
Toad limits numbers in the data grid to 15 digits. I believe this is because excel limits numbers to 15 digits as well (or used to limit them). You can turn on "scientific notation" in options -> data grids -> data, check box Display large numbers in scientific notation. That won't probably help, either.
回答2:
-> Right click on the data grid
-> Select "Grid Options...
"
-> Under "Data Grids
" chose "Data
"
-> Uncheck "Display large numbers in Scientific Notation
"
After doing these you need to close and open TOAD
again. This worked for me in TOAD Version 8.6.0.38
回答3:
I had a similar problem, Toad was truncating/rounding my numbers when being displayed in grid view.
I found out that by using the Execute Statement button or by pressing F9 to run the query then the truncation/rounding would not be performed.
I hope that helps.
来源:https://stackoverflow.com/questions/3400393/toad-truncating-rounding-large-oracle-numbers