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

Home -> Community -> Usenet -> c.d.o.misc -> Re: select any row?

Re: select any row?

From: Joel Garry <joel-garry_at_home.com>
Date: 2 Nov 2004 17:44:59 -0800
Message-ID: <91884734.0411021744.2866c5c8@posting.google.com>


"Dirk Schwarzmann" <Dirk.Schwarzmann_at_gmx.de> wrote in message news:<2un57eF2ckagdU1_at_uni-berlin.de>...
> Hi,
>
> hopefully this is not a FAQ:
> (How) can I select just one row from a view? I am not interested in
> the content, I merely need it (in my Java app) to get the structure of
> the table / view. I know I can use
>
> SELECT * FROM MYVIEW WHERE ROWNUM < 2;
>
> but this quite slow. It seems like Oracle collects all rows in the
> first run and than truncates all unnecessary rows before it returns
> the rows to the user.
> I guess the fastest way of receiving any row would be to tell Oracle
> "just take the first row you find and return it, damn!"
> How can I do so?
>
> Thanks in advance,
> Dirk

You can't just use user_tab_columns?

select table_name, column_name, column_id from user_tab_columns
where table_name like 'EM%'
order by table_name, column_id
/

select text from user_views...

jg

--
@home.com is bogus.
Between 1968 and 1976, the secret access code to the computer controls
of the United States' nuclear-tipped missile arsenal was 00000000.
Received on Tue Nov 02 2004 - 19:44:59 CST

Original text of this message

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