-
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
SQL> select table_name from user_tables;
-
Hi,
In Oracle you can execute:
> 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).
Hope this helps
-
SQL> select table_name from user_tables;
This syntax worked. But also what I found to work is this :
SQL> select tname from tab;
Thank you all for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|