Re: How can i find out the column name from a table by issuing a select query?

From: Wolf 'n Pinguin <duif.op.spijkers_at_planet.nl>
Date: 13 Jan 2002 09:59:37 GMT
Message-ID: <01c19c18$d4833000$a8e179c3_at_nentj001wxs>


Leader <sohelcsc_at_yahoo.com> schreef in artikel <b1a93c73.0201120530.513d02f1_at_posting.google.com>...
> Hi all,
> i am facing a problem that is i need to to know the all column names from
 

> a table with a select statements. how can i do that.
> remember i need to run the query from java.
> in oracle i know that is desc table_name;
> but i need to run the query from java.
>
> thanks
> hoque
>

If you're using JDBC you can use the getMetaData() on a resultset to obtain the column names in that resultset. See the documentation of ResultSetMetaData .

HtH, Ide Received on Sun Jan 13 2002 - 10:59:37 CET

Original text of this message