Home » SQL & PL/SQL » SQL & PL/SQL » how to retrieve the column names from tables using PL/SQL
how to retrieve the column names from tables using PL/SQL [message #36523] Mon, 03 December 2001 03:48 Go to next message
Gianni
Messages: 7
Registered: November 2001
Junior Member
Hi to everybody,
I would to know where, into the database, do I find the column names of the tables. I must retrieve the column names from tables using PL/SQL using PL/SQL procedures.
Here the example that I used giving myelf the names:
utl_file.putf(f_id,'CODTEST|TITOLOTEST|ISTRUZIONITEST|DATACREAZIONE|CODCREATOREn');
Thanks in advances and cheerings.

----------------------------------------------------------------------
Re: how to retrieve the column names from tables using PL/SQL [message #36524 is a reply to message #36523] Mon, 03 December 2001 04:25 Go to previous messageGo to next message
Rob Baillie
Messages: 33
Registered: November 2001
Member
Try looking at the data dictionary table USER_TAB_COLUMNS (or ALL_... or DBA_...)

That should give you want you need

----------------------------------------------------------------------
Re: how to retrieve the column names from tables using PL/SQL [message #36526 is a reply to message #36523] Mon, 03 December 2001 04:42 Go to previous messageGo to next message
Rajarshi Dasgupta
Messages: 52
Registered: October 2001
Member
There's a table called COLS. Do,

SELECT * from COLS;

And U will find the column names etc....

----------------------------------------------------------------------
Re: how to retrieve the column names from tables using PL/SQL [message #37985 is a reply to message #36523] Tue, 12 March 2002 09:20 Go to previous message
Sevki Piskinsoy
Messages: 1
Registered: March 2002
Junior Member
select syscolumns.name from syscolumns join sysobjects
on syscolumns.id = sysobjects.id
where sysobjects.name = table_Name
Previous Topic: initial extent - large table
Next Topic: grouping by 2 sql stts joined by UNION
Goto Forum:
  


Current Time: Thu Apr 25 03:29:35 CDT 2024