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 -> Determining a PK for a view

Determining a PK for a view

From: Richard Wheeldon <richard_at_rswheeldon.com>
Date: Tue, 05 Jun 2001 01:04:17 +0100
Message-ID: <3B1C2201.2781@rswheeldon.com>

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 Received on Mon Jun 04 2001 - 19:04:17 CDT

Original text of this message

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