Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>SELECT owner, table_name FROM dba_tables </code></pre> <p>This is assuming that you have access to the <code>DBA_TABLES</code> data dictionary view. If you do not have those privileges but need them, you can request that the DBA explicitly grants you privileges on that table, or, that the DBA grants you the <code>SELECT ANY DICTIONARY</code> privilege or the <code>SELECT_CATALOG_ROLE</code> role (either of which would allow you to query any data dictionary table). Of course, you may want to exclude certain schemas like <code>SYS</code> and <code>SYSTEM</code> which have large numbers of Oracle tables that you probably don't care about.</p> <p>Alternatively, if you do not have access to <code>DBA_TABLES</code>, you can see all the tables that your account has access to through the <code>ALL_TABLES</code> view:</p> <pre><code>SELECT owner, table_name FROM all_tables </code></pre> <p>Although, that may be a subset of the tables available in the database (<code>ALL_TABLES</code> shows you the information for all the tables that your user has been granted access to). </p> <p>If you are only concerned with the tables that you own, not those that you have access to, you could use <code>USER_TABLES</code>:</p> <pre><code>SELECT table_name FROM user_tables </code></pre> <p>Since <code>USER_TABLES</code> only has information about the tables that you own, it does not have an <code>OWNER</code> column – the owner, by definition, is you.</p> <p>Oracle also has a number of legacy data dictionary views-- <code>TAB</code>, <code>DICT</code>, <code>TABS</code>, and <code>CAT</code> for example-- that could be used. In general, I would not suggest using these legacy views unless you absolutely need to backport your scripts to Oracle 6. Oracle has not changed these views in a long time so they often have problems with newer types of objects. For example, the <code>TAB</code> and <code>CAT</code> views both show information about tables that are in the user's recycle bin while the <code>[DBA|ALL|USER]_TABLES</code> views all filter those out. <code>CAT</code> also shows information about materialized view logs with a <code>TABLE_TYPE</code> of "TABLE" which is unlikely to be what you really want. <code>DICT</code> combines tables and synonyms and doesn't tell you who owns the object.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload