views:

50

answers:

2

I like a large linesize in SQL*Plus 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 SQL*Plus:

set linesize 100;
describe all_tab_columns; --Desired Output
select * from 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.

+2  A: 

I've got my own version of DESC as a package, so I do exec DESCR('table_name');

Code is available Here.

Gary
+1 I thought about doing this, but was hoping there was a simpler solution. On the plus side I could put more information in the describe.
Leigh Riffel
Care to post your code?
Leigh Riffel
+2  A: 

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.

Jeffrey Kemp
+1 I was hoping there was a better way.
Leigh Riffel
I created a script I can call using '@desc <objectname>' as follows:
Leigh Riffel
set linesize 100;describe set linesize 3000;
Leigh Riffel