Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: finding column names
This is a multi-part message in MIME format.
--------------2FEC0BBDA59673B21A81F877 Content-Type: text/plain; charset=us-ascii Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit
karsten wrote:
> Hi,
>
> I am looking for an efficient way to find out whether a table
> has a certain column (or a set of columns) or not.
>
> As far as I can see, there are two options:
>
> 1) try to select these columns, and catch the exception "invalid
> column
> name"
>
> 2) query the data dictionary (all_tables / all_tab_columns)
>
> which way is to prefer ? (considering sga, reparsing, caching ....)
>
> Thanks
> Karsten
Answer #2 is the best.
--------------2FEC0BBDA59673B21A81F877 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Someone Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Someone n: ;Someone email;internet: answers_at_erols.com.tyfns title: Important note: Remove tyfns from my email address to reply. TYFNS stands for "Thank you for not spamming."x-mozilla-cpt: ;0
--------------2FEC0BBDA59673B21A81F877-- Received on Fri Oct 03 1997 - 00:00:00 CDT