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,629
  • 23
  • 58
  • 92
Brandon
  • 16,382
  • 12
  • 55
  • 88
  • 3
    possible duplicate of [Oracle: get list of all tables?](http://stackoverflow.com/questions/205736/oracle-get-list-of-all-tables) – Justin Cave Apr 02 '12 at 16:13
  • 3
    Please explain *"doesn't show me the right data*". What do you see? What do you expect? –  Apr 02 '12 at 16:17

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
  • 227,342
  • 24
  • 367
  • 384
  • 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 Apr 03 '12 at 12:46
1
SELECT owner, table_name
  FROM all_tables
Vasin Yuriy
  • 484
  • 5
  • 13
1

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

Michael Fredrickson
  • 36,839
  • 5
  • 92
  • 109
DoctorMick
  • 6,703
  • 28
  • 26
1

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

select * from dba_tables
hkutluay
  • 6,794
  • 2
  • 33
  • 53
0

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

simplePerson43
  • 3,787
  • 1
  • 15
  • 10
0

You can also try

SELECT * FROM USER_TABLES

It will return list of tables owned by your user.

denied
  • 598
  • 3
  • 9