Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restore Default NUMFORMAT in SQL*Plus

Frank KulashNov 19 2022

What is the defualt value of NUMFORMAT in SQL*Plus, and how can I explicitly re-set NUMFORMAT to it? I have one script that displays a lots of small integer columns. To avoid writing COLUMN commands for all of them, I used

SET NUMFORMAT 999

That works fine, but if I want to use another script later in the same session, how can I restore the default? If I say

SET NUMFORMAT TM

then it displays integers without a decimal point, and other numbers with a decimal point, put it uses 64 characters, no matter what NUMWIDTH is. How can I tell SQL*Plus to use the format it was originally using (decimal point only when needed, digits after the decimal point rounded if the value won't fit in NUMWIDTH)?

This post has been answered by Solomon Yakobson on Nov 19 2022
Jump to Answer
Comments
Post Details
Added on Nov 19 2022
2 comments
1,348 views