How to set numwidth in the grid output of PL/SQL developer?
I'm running some queries in PL/SQL Developer, and one of the columns in the result has 18-digit numbers. Instead of displaying the entire numb开发者_StackOverflower in the resulting grid, PL/SQL Developer displays only 15 digits in scientific notation.
I tried to find a way to change this in the preferences of the program, so that I'll see the entire number, just like set numwidth
does in SQL*Plus. But my search was futile.
How do I change this setting?
Turns out this is possible!!!
Tools -> Preferences -> SQL Window -> Number fields to_char
Use to_char, then you get the all the numbers:
select to_char ( t.reference_nr), t.reference_nr from rss_ing_cc_imp t
1 95209140353000001009592 9,5209140353E22
2 25546980354901372045601 2,55469803549014E22
3 75203220356000583867347 7,52032203560006E22
4 25546980357904327000017 2,55469803579043E22
5 95209140358000000700337 9,5209140358E22
6 95209140359000000596387 9,5209140359E22
7 25546980361131086003511 2,55469803611311E22
8 25546980361901390031808 2,55469803619014E22
9 85207130362051881964326 8,52071303620519E22
10 95209140363000000634885 9,5209140363E22
11 25546980364131099000436 2,55469803641311E22
12 95209141001000001006196 9,5209141001E22
13 85207131001100892094030 8,52071310011009E22
14 75203221001000590476576 7,52032210010006E22
You can also set the column format(Using the same table name as above...)
column reference_nr format 99999999999999999999999999999999
Select reference_nr from rss_ing_cc_imp;
REFERENCE_NR
95209140353000001009592
25546980354901372045601
Or ( new session ) which probably is better:
show numwidth
numwidth 10
Select reference_nr from rss_ing_cc_imp;
REFERENCE_NR
9.5E+22
2.6E+22
Set numwidth 30
show numwidth
numwidth 30
Select reference_nr from rss_ing_cc_imp;
REFERENCE_NR
95209140353000001009592
25546980354901372045601
SET sqlformat ansiconsole;
This will set the output format for any queries that you run hereafter. There are other sql formats but this is probably the best for your situation.
To revert to what you had earlier, use.
SET sqlformat;
*This has been verified on SQLDeveloper Version 18.3.0.277, Build 277.2354
Same answer as Ilya Kogan, but in PL SQL Dev 13 the Preferences has moved and is now under an little tuner icon in the title bar. Then SQL Window -> Number fields to_char
精彩评论