Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Determining a PK for a view
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
![]() |
![]() |