Home » SQL & PL/SQL » SQL & PL/SQL » Tablenames by SQL-Syntax
icon12.gif  Tablenames by SQL-Syntax [message #199787] Thu, 26 October 2006 03:47 Go to next message
Buzzer
Messages: 28
Registered: May 2006
Junior Member
Hello NG!

I need the SQL-Syntax to get a list with the name of every existing table. I'm not talking about every system table, but theseones which I created.

Further I need to list all the columns (including their attributes) of a table. What I need mainly is the column name and the column type (varchar, number, ...).

Does anyone know howto?

Best Regards
Re: Tablenames by SQL-Syntax [message #199788 is a reply to message #199787] Thu, 26 October 2006 03:50 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,

 user_tab_columns view should help you.


regards,
Re: Tablenames by SQL-Syntax [message #199790 is a reply to message #199787] Thu, 26 October 2006 03:52 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

check out

http://www.techonthenet.com/oracle/sys_tables/index.php

Re: Tablenames by SQL-Syntax [message #199791 is a reply to message #199787] Thu, 26 October 2006 03:54 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

All table in existing Schemas

sql>select * from tab;

All Column name and attributes.

sql>desc "table_name"
Re: Tablenames by SQL-Syntax [message #199809 is a reply to message #199787] Thu, 26 October 2006 05:12 Go to previous messageGo to next message
Buzzer
Messages: 28
Registered: May 2006
Junior Member
Hi everone!

Thank you very much!

Best Regards
icon3.gif  Re: Tablenames by SQL-Syntax [message #199823 is a reply to message #199787] Thu, 26 October 2006 06:59 Go to previous messageGo to next message
ridwan.dalvi
Messages: 4
Registered: September 2006
Location: Mumbai
Junior Member
Hi,

You can use "cols" table.

Syntax : Select * from cols.

Regards,

Ridwan.
Re: Tablenames by SQL-Syntax [message #199840 is a reply to message #199823] Thu, 26 October 2006 07:29 Go to previous message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
COLS is, actually, a public synonym for SYS.USER_TAB_COLUMNS.
Previous Topic: Inner Sub Queries
Next Topic: Sum() in DENSE_RANK()
Goto Forum:
  


Current Time: Wed Dec 07 08:51:33 CST 2016

Total time taken to generate the page: 0.05525 seconds