Andy
Andy

Reputation: 2830

When querying tables/fields in Oracle database, how to see table schema in query results? (using SQuirreL SQL)

At my workplace we have a database with multiple schemas, and some table names may be repeated in different schemas. There are thousands of tables so it is not time-effective to wade through the entire list.

If I do a query where I want to find all the tables containing the word CUSTOMER in their names, for example:

select table_name from all_tables where table_name like '%CUSTOMER%' order by table_name

The results just look like this, with no clues of which schema the tables are located under.

TB_NEW_CUSTOMER
TB_NEW_CUSTOMER
TB_NEW_CUSTOMER
TB_VIP_CUSTOMER
TB_VIP_CUSTOMER
TB_VIP_CUSTOMER

Is there a way to query Oracle so that I know under which schemas the tables are located? We do not seem to have SQL+ because I got a 9000 error when trying the DESCRIBE command. I am tired of scrolling around the Objects tab in SQuirreL SQL!

Thank you very much.

Andy

Upvotes: 0

Views: 907

Answers (1)

Robert Giesecke
Robert Giesecke

Reputation: 4314

Why wouldn't you also select the owner of those tables?

Upvotes: 2

Related Questions