On a db oracle we have system tables created by oracle and our tables created by us. I want to see our tables on postgresql I use
And on oracle for a similar output?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
To list all tables owned by the current user, type:
select tablespace_name, table_name from user_tables;
To list all tables in a database:
select tablespace_name, table_name from dba_tables;
To list all tables accessible to the current user, type:
select tablespace_name, table_name from all_tables;
You can find more info about views all_tables, user_tables, and dba_tables in Oracle Documentation. To describe a table, type:
SHOW TABLES displays all of the tables in the current schema.
If IN schemaName is specified, the tables in the given schema are displayed.
You could do this:
select owner, table_name from dba_tables where owner not in ('SYS', 'SYSTEM') order by owner, table_name ;
But there is no guarantee someone hasn't (foolishly) created tables under SYS or SYSTEM schemas. That aside, there are several other schemas that are created with the database, and the list may vary with the installation/creation options chosen.