Home » SQL & PL/SQL » SQL & PL/SQL » How to see other account's table structure in JDBC
How to see other account's table structure in JDBC [message #19213] Tue, 05 March 2002 09:21 Go to next message
Chen Wen
Messages: 26
Registered: February 2002
Junior Member
Hi,
If I want to see the table structure that the table
is from another user how grant me to the table, how to
do that?
For example, there is one user named "john", he has
one table named "manager". And he granted me to see
the table. How can I get the table's structure?
select *
from user_tab_columns
where table_name='john.manager'

Thanks.
Re: How to see other account's table structure in JDBC [message #19217 is a reply to message #19213] Tue, 05 March 2002 11:49 Go to previous message
Steve Karam
Messages: 3
Registered: March 2002
Junior Member
No, user_tab_columns only have the columns for the current user. Instead:

select * from all_tab_columns where owner='JOHN' and table_name = 'MANAGER'

This rule applies to all things in the data dictionary. USER_ = current users objects, ALL_ = all objects the current user has access to, and DBA_ = all objects, including SYS and SYSTEM.

You could also 'DESC john.manager'
Previous Topic: bulk collect inside a cursor
Next Topic: which is best ?
Goto Forum:
  


Current Time: Fri Apr 26 21:00:05 CDT 2024