Home » Other » General » Table information in database.
Table information in database. [message #103281] Wed, 16 April 2003 16:43 Go to next message
Manu
Messages: 5
Registered: February 2002
Junior Member
Hi,

My database is having a table called "tab" that contains names of all the tables and their type. Are their any command to display the column names of table wise. There are 40 tables, so I can not do "desc tablename" that many times. Is there any short procedure.

waiting for reply.
Manu
Re: Table information in database. [message #103282 is a reply to message #103281] Mon, 21 April 2003 05:25 Go to previous messageGo to next message
Annamalai.P
Messages: 1
Registered: April 2003
Junior Member
Hi Manu,

Use the table "COLS" which provides information with regard to tablename,column,datatype,nullable etc... available in a schema.

regards
Annamalai.P
Re: Table information in database. [message #103293 is a reply to message #103281] Mon, 05 May 2003 04:55 Go to previous message
Sheshadri
Messages: 12
Registered: June 2002
Junior Member
You can use the following query and execute it in SQL Prompt by selecting all the results of query at a time.

sql> Select 'Desc ' || tname from tab;

This will fetch you 40 rows and looks like

Desc tab1
Desc tab2....

Now select all these 40 rows and paste it in sqlprompt at a time.
Previous Topic: Oracle11i
Next Topic: I NEED TO KNOW
Goto Forum:
  


Current Time: Sat Nov 23 08:59:38 CST 2024