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: How to detect views w/ JDBC?

Re: How to detect views w/ JDBC?

From: Thomas Kellerer <NNGNVRDSJEBN_at_spammotel.com>
Date: Mon, 18 Apr 2005 15:11:20 +0200
Message-ID: <4263B1F8.4050306@spammotel.com>


On 18.04.2005 04:40 Bob Bunch (OCP) wrote:

> I'm trying to figure out how to tell if a given table (given "select *
> from someTableName") using JDBC/Thin is a view. I've tried using
>
> ResultSetMetaData.isReadOnly(int column)
> ResultSetMetaData.isWritable(int column)
> ResultSetMetaData.isDefinitelyWritable(int column)
>
> ...all of which return the same result for a view as a table. Doesn't
> matter if it's a simple or complex view.
>
> I can't employ an Oracle-specific solution for this problem (that'd be WAY
> to simple ;) - this needs to be DB agnostic (aka pure JDBC).
>
> Any ideas?
>
> Thanks!
>

DatabaseMetaData.getTables(null, null, null, new String[] {"VIEW"});

Thomas Received on Mon Apr 18 2005 - 08:11:20 CDT

Original text of this message

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