desc table [message #389853] |
Tue, 03 March 2009 15:47  |
sant_new
Messages: 165 Registered: June 2008
|
Senior Member |
|
|
Hi all,
I'm trying to find out if there is any tool or a way to describe a table to output the columns in an alphabetical order.
I greatly appreciate your help.
Thank you.
|
|
|
|
Re: desc table [message #389855 is a reply to message #389853] |
Tue, 03 March 2009 16:14   |
sant_new
Messages: 165 Registered: June 2008
|
Senior Member |
|
|
SELECT COLUMN_NAME FROM all_tab_columns
WHERE table_name = 'tablename'
order by COLUMN_NAME;
This worked. But the developers would like to describe by running a simple command like desc tablename because they will have to run this query everytime. Is it possible to do this with a stored procedure or any other script?
Thanks again
|
|
|
|
Re: desc table [message #389863 is a reply to message #389858] |
Tue, 03 March 2009 17:30   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Might be a good time to find out if that developers can write a simple stored procedure ( or a script/program in whatever language they are developing in) with a little select statement and an output loop.
If not, you are in big trouble anyway. I mean
1) run SQL
2) display result
is about as basic as it gets.
|
|
|
Re: desc table [message #389899 is a reply to message #389863] |
Wed, 04 March 2009 00:36  |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
I think you already are in big problems if your developers can only find columns in a table if the columnlist is sorted alphabetically..
|
|
|