1

I'm trying to retrieve a list of tables from an Oracle connection. I'm not very familiar with Oracle terminology and thus, having hard time finding the information I need.

Right now I can use Microsoft Access to connect via ODBC and it pops up with a "Link Tables" dialog that lists all tables, not just the ones I "own". None of the queries I've tried so far, give me this data.

I'm trying "SELECT * FROM all_tables" but that doesn't show me the right data.

Anuj Balan
  • 7,419
  • 23
  • 53
  • 90
Brandon Wamboldt
  • 15,799
  • 12
  • 51
  • 87

6 Answers6

3

ALL_TABLES will show you all the tables that you have access to SELECT from. DBA_TABLES will show you all the tables that exist in the database though you'll need an additional privilege grant to be able to query the DBA* data dictionary objects.

Justin Cave
  • 221,607
  • 22
  • 353
  • 373
  • 1
    It turns out some of the tables I was seeing were actually views and synonyms. The query `SELECT * FROM ALL_CATALOG` worked for my needs. – Brandon Wamboldt Apr 03 '12 at 12:46
1
SELECT owner, table_name
  FROM all_tables
Vasin Yuriy
  • 453
  • 5
  • 13
1

Try select * from all_tables, that should do what you want.

Michael Fredrickson
  • 36,074
  • 5
  • 88
  • 107
DoctorMick
  • 6,553
  • 25
  • 24
1

It can be.. (If user has dba role)

select * from dba_tables
hkutluay
  • 6,614
  • 2
  • 30
  • 51
0

SELECT * FROM TAB; that will show you all the table and views

simplePerson43
  • 3,629
  • 1
  • 14
  • 10
0

You can also try

SELECT * FROM USER_TABLES

It will return list of tables owned by your user.

denied
  • 578
  • 3
  • 9