Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dba_tables query

Re: Dba_tables query

From: Chris ( Val ) <chrisval_at_bigpond.com.au>
Date: 25 Jul 2005 14:38:31 -0700
Message-ID: <1122327511.540840.114240@g43g2000cwa.googlegroups.com>

fdsarty wrote:
> i'm sorry but i forgot,... i'm using a 9.2 version of oracle
>
> "fdsarty" <dsasdgf_at_yfdsasdfdo.it> ha scritto nel messaggio news:...
> > issue this query:
> > select * from dba_tables where user = 'LLLLLLL'
> >
> > it works..... no errors.... but dba_tables doesn not have a column called
> > 'user'... how can it be???? what i'm missing???

USER just gives you the name of the session, but in the context you have used it, the result set returned would not be correct.

SQL> show USER
USER is "XXXXXXXXXX"

You have three choices as far as I can see:

  1. select * from dba_tables where owner = USER;
  2. select * from dba_tables where owner = 'XXXXXXXXXX';
  3. Query the user_tables ;-)

Cheers,
Chris Val Received on Mon Jul 25 2005 - 16:38:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US