Format Describe In SQL*Plus
I like a large linesize in SQLPlus so that data doesn't wrap between lines. The problem is that doing a describe on an object seems to be obligated to spread itself over the entire line size. This makes it so that I can only see the name part without scrolling to the right. What I want is one linesize for describes and a different line size for everything else. To see what I mean run the following in SQLPlus:
set linesize 100;
describe all_tab_columns; --Desired Output
select * fr开发者_运维知识库om all_tab_columns where rownum<=1;
Then use a large line size.
set linesize 3000;
describe all_tab_columns;
select * from all_tab_columns where rownum<=1; --Desired Output
What I am asking may not be possible, so I'd also be interested in partial solutions. Constantly changing the linesize is not a solution.
What is stopping you from setting linesize?
set linesize 100;
describe all_tab_columns;
set linesize 3000;
select * from all_tab_columns where rownum<=1;
If you do this often, write SQL scripts to make it more convenient.
I've got my own version of DESC as a package, so I do exec DESCR('table_name');
Code is available Here.
精彩评论