Wednesday, March 2, 2011

Extracting META information from Oracle

List TABLEs
Here's the query that will return the names of the tables defined in the current database:


SELECT table_name  FROM user_tables;
-- or
SELECT table_name FROM tabs;


List VIEWs
Here's the query that will return the names of the VIEWs defined in the current database:

SELECT view_name FROM user_views;


List users
NB: you'll need DBA access rights to execute the following query:

SELECT username FROM dba_users;


No comments:

Post a Comment