开发者

Format Describe In SQL*Plus

开发者 https://www.devze.com 2022-12-18 23:00 出处:网络
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 make

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号