procedure [message #36160] |
Thu, 08 November 2001 05:05 |
Joe
Messages: 138 Registered: November 1999
|
Senior Member |
|
|
Hello. I am rather new in oracle. and I am asked to create a pocedure which will, on excution, show for all the table, the table name, column, column name, data type of columns, length and nullability of those columns.
I know that I it has some thing to do with describ command. but as procedure, I am not too sure what that means and what to do.
any sugestions?
thank you.
Joe
----------------------------------------------------------------------
|
|
|
Re: procedure [message #36165 is a reply to message #36160] |
Thu, 08 November 2001 07:12 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Joe, it depends on the "display" requirements. One way, not really useful though, would be to cursor through the data in the proc and use dbms_output.put_line to display the data.
for r in (select * from user_tab_columns) loop
dbms_output.put_line('Table: ' || r.table_name || ' 'Column: ' || r.column_name);
end loop;
You can also return a result set as an output parameter in the proc that would then be displayed by a host program of some sort (SQL*Plus, Delphi, PowerBuilder, etc.).
----------------------------------------------------------------------
|
|
|