Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 8 JDBC DatabaseMetaData
On Sun, 21 Jun 1998 11:18:50 GMT, radmk2_at_cam.ac.uk wrote:
>But it seems that oracle drivers doesn't support catalogs. The function
>getCatalogs (), getCatalogTerm()... return all null.
I'm not familiar with these functions, so I can't help with them. However...
>
>I would like to list the tables name that are in a database but I need for
>that to specify a catalog name.
You should be able to query Oracle's data dictionary views to get the information that you want. The downside is that you then have Oracle specific code. Try connecting and issueing the following SELECT:
SELECT owner, table_name FROM all_tables;
You will get a list of all tables to which you have access. This includes tables that you own, and also includes those owned by other user where they have granted you some privilige, such as SELECT for example.
The above select only gives you tables. If you want views too, then you need to do this:
SELECT owner, table_name FROM all_tables UNION SELECT owner, view_name FROM all_views;
I hope this helps.
Jonathan Received on Mon Jun 22 1998 - 19:42:51 CDT
![]() |
![]() |