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: db question / JDBC question

Re: db question / JDBC question

From: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Fri, 15 Feb 2002 20:15:18 -0000
Message-ID: <3c6d7d32$1_2@mk-nntp-1.news.uk.worldonline.com>


Rayden,

The rule of thumb is varchar2(1).
It isn't always correct, as Thomas Kyte was kind enough to show me some years ago,
but it's almost certainly a reasonable start point.

For metadata, try:
select... from all_tables;
select ...from all_constraints
where constraint_type = 'R' /* Foreign Keys*/; select ...from all_constraints
where constraint_type = 'P' /* Primary Keys*/; select ...from all_indexes;
select .. from all_ind_cols;

HTH. Paul

"Rayden" <durlecht_at_msu.edu> wrote in message news:a4j3sc$2h0u$1_at_msunews.cl.msu.edu...
> what is the difference if any between char(1) or varchar2(1).......what is
> the rule of thumb on this one?. also, i am using jdbc to get schemas for
> databases....works fine under mssql and sybase but i am having a rough
time
> under oracle......trying to get the foreignkeys, index info, primary keys,
> etc. does anyone have any snippet code of how to accomplish this using
> oracle jdbc drivers using java code (obviusly)....i can get some of the
> metadata per se....but just not the keys and indexes. any help would
greatly
> be appreciated.
>
>
> thanks,
>
> timis
>
>
Received on Fri Feb 15 2002 - 14:15:18 CST

Original text of this message

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