0

I'm trying to do a SHOW TABLES command in my Oracle Database 19c as documented here.

But when I run that command all I see in the output of SQL Developer is this:

Show tables handled.

How can I get SHOW TABLES to give me a list of tables in the schema?

2
  • Doesn't SQL Developer already show you a list of tables? Commented Nov 14, 2021 at 15:51
  • Oh it does. Ok thanks. Sorry I am new to this.
    – user99201
    Commented Nov 15, 2021 at 13:57

1 Answer 1

3

The documentation you referenced is not for Oracle 19c; it is for a defunct project that is completely unrelated. Oracle database does not have a SHOW TABLES command. Depending on what you're looking for, you would need to select from one of the following data dictionary views to get a list of tables:

  • USER_TABLES - contains info on the current user's tables
  • ALL_TABLES - contains info on all tables that the current user has privileges to access
  • DBA_TABLES - contains info on all tables in the instance, but requires elevated privileges to access

For example:

select table_name from user_tables;

For more information on the data dictionary, check out the correct Oracle 19c documentation here: https://docs.oracle.com/en/database/oracle/oracle-database/19/index.html

As another example, if you're trying to confirm the existence of a table named "EMPLOYEE", you could run this query:

SELECT * FROM all_tables WHERE table_name = 'EMPLOYEE'
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.