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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Determining a PK for a view

Re: Determining a PK for a view

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 04 Jun 2001 22:01:12 -0700
Message-ID: <3B1C6798.E723782F@exesolutions.com>

Richard Wheeldon wrote:

> Hi,
>
> I have a problem which I'm trying to find a solution for.
>
> If I have a view or table, I can usually index these
> by rowid. However, I can't index those which are constructed
> using 'distinct' or 'group by'. But each of these constructs
> must have a primary key (of sorts - i.e. a pk by date/codd's
> definition, if not defined as such in the dd), being those
> fields after the group by or distinct.
>
> e.g. with: create view x as (select y,count(f) from z group by y),
> y must be a primary key.
>
> So the question is, how can I find out which these columns
> are from the data dictionary, without having to parse
> the view definition?
>
> Richard

What just a minute. You can't index anything by rowid. Rowid is not indexable. So when you say "usually" I am thinking you've never done anything in Oracle before.

And the rest of your query makes little sense as it stands.

Why don't you state the end result you are trying to achieve and let those that know Oracle help you by suggesting a solution. I, for one, haven't a clue what you are attempting from the above.

Daniel A. Morgan Received on Tue Jun 05 2001 - 00:01:12 CDT

Original text of this message

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