CSCoder
CSCoder

Reputation: 150

Can't find table in oracle

I have an oracle query SELECT * FROM My_Table which returns rows as expected.

I am trying to get information on some of the columns in the table however when I query All_Tab_Columns there are no columns where TABLE_NAME = 'My_Table'

I then queried ALL_TABLES and ALL_VIEWS but I couldn't find a table/view where TABLE_NAME = 'My_Table' or where VIEW_NAME = 'My_Table'.

What am i missing here? What else could My_Table be and how can I find information on the columns that are being returned when I query it?

Upvotes: 4

Views: 2840

Answers (2)

Eng. Samer T
Eng. Samer T

Reputation: 6526

In Oracle syntax is not case sensitive, but data is case sensitive. so you can query your table as following:

select * from all_tables where table_name like upper('%My_Table%')

if you did not find any data about table this could be synonym so you can query about it from all_synonyms view.

select * from all_synonyms where synonym_name like upper('%My_Table%')

Upvotes: 4

sstan
sstan

Reputation: 36483

In Oracle, tables names (and all object names for that matter) are actually upper-cased internally by default. If you query the data dictionary using this WHERE clause, you should get results:

where TABLE_NAME = 'MY_TABLE'

Upvotes: 0

Related Questions