March 31st, 2004, 02:54 PM
SHOW TABLES in Oracle
In MySQL, I can get a list of all tables w/ this query:
Whats the syntax w/ Oracle 9i ?
Looked through the docs online, but w/o knowing what you're trying to look up, you can't really look anything up (kind of a catch22).
Thx in advance for the knowledge.
March 31st, 2004, 02:57 PM
select * from user_objects where object_type = 'TABLE';
gotta love brevity.
March 31st, 2004, 05:58 PM
April 13th, 2004, 02:28 AM
you have to select from USER_TABLES or DBA_TABLES
September 21st, 2005, 02:08 AM
u can use
select * from tabs;
October 7th, 2005, 08:24 PM
Use user_tables or all_all_tables, but not use dba_tables this need some privileges.
August 30th, 2006, 01:58 PM
SELECT table_name FROM tabs;
September 3rd, 2006, 09:31 AM
lol...i think he/she got the point...!!
my two cents...if you want all the metadata 'tables', then do a:
select * from dict;
April 12th, 2007, 09:46 AM
select * from dict;
so with that, its safe to say if you want to see what tables
the user has access to the query is.
select TABLE_NAME from ALL_ALL_TABLES;
Description of all object and relational tables accessible to the user
Just a note to fellow mysql'ers who run across this venturing into oracle for the first time.
Oracle doesn't have a universal username storage system like mysql.
show databases works cause if you have a user whom you created and gave some high privileges to, it will see most databases created by lesser powered logins.
Oracle however has users on a per database level.
So when you create a new database, unless you create another user login thats the same from DB1, user will not be able to see stuff on DB2.
I could be wrong, this is just the findings a person who's been trying to understand oracle for the past few weeks
so if anyone better words of wisdom or wants to correct a few things... please by all means.
April 13th, 2007, 01:20 AM
Oracle does not have the concept of a "Database" as MySQL (or SQL Server) has. The usual "mapping" of databases from MySQL (or SQL Server) to Oracle is a users. So if you have several databases in MySQL you would have several users in Oracle. In Oracle a schema is (more or less) equivalent to a user.
Originally Posted by Caged_Penguin