How to display to terminal in SQLPLUS the column of a row with the width of the max value of the data within that column
I was wondering if this could be done without the COLUMN FORMAT.
Current example:
TABLESPACE_NAME BIG DATAFILE_NAME ------------------------------ --- ------------------------------------------------------------------------------------------------------------------- STORETABS NO C:\ORACLE\APP\ASUH\ORADATA\TESTORCL\STORETABS_01.DBF STORETABS NO C:\ORACLE\APP\ASUH\ORADATA\TESTORCL\STORETABS_02.DBF
Notice the header "-" lines are extended all the way out to match the varchar(n) value defined.
Is there a SQLPLUS SET command that will auto adjust the column width to either the size of the column header or the size of the max data within the column?
I want it to look like this:
TABLESPACE_NAME BIG DATAFI开发者_如何学CLE_NAME ---------------- --- ----------------------------------------------------- STORETABS NO C:\ORACLE\APP\ASUH\ORADATA\TESTORCL\STORETABS_01.DBF STORETABS NO C:\ORACLE\APP\ASUH\ORADATA\TESTORCL\STORETABS_02.DBF
If not by the size of the column header, adjusting to the max size of the data is more desired.
No, there is no such setting.
There can't be such a setting, because SQL*Plus
fetches arraysize (default of which is 15, I believe) records at a time. So, if after 15 records another longer record is fetched, the -------....
is already printed/written, leaving no chance to SQL*Plus to adjust it.
arraysize is the number set with set arraysize n
.
精彩评论