Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I get a list of accessible tables
MCArch wrote:
> Is there any way for an Oracle 8i user to get a list of tables to which he
> has been granted Select? He doesn't own the tables and they don't list
> selecting from tabs.
First, and most obviously, all tables in user_tables:
SELECT table_name
FROM user_tables
Secondly tables owned by other schemas to which you have been granted SELECT:
SELECT table_name
FROM user_tab_privs_recd
WHERE privilege = 'SELECT';
Then combine the two adding the owner:
SELECT 'MY SCHEMA' owner, table_name
FROM user_tables
UNION ALL
SELECT owner, table_name
FROM user_tab_privs_recd
WHERE privilege = 'SELECT';
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Thu Jul 31 2003 - 10:48:21 CDT
![]() |
![]() |