I usually work with MySQL databases. I need to move one of our web applications into an Oracle database. All I need to know is how I can display all existing tables in a database that I created.
In MySQL all I have to type in is :
SQL> show tables;
It does not seem to be this simple in Oracle.
Someone please help thank you.
You can query either of the 2 data dictionary tables
user_tables or all _tables depending on whether you want to see
the tables you own or the tables you have access to
> spool c:/tables.sql
> SELECT OWNER,OBJECT_TYPE,OBJECT_NAME
FROM DBA_OBJECTS
WHERE OWNER NOT IN ('SYS','SYSTEM');
> spool off
This statement generate a file i.e tables.sql in drive c that contain all object in your database except that from users sys and system (superusers in Oracle).
Bookmarks