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: next question determining which columns are in the primary key

Re: next question determining which columns are in the primary key

From: Fraser Boswell <Fraser.Boswell_at_spamme.ed.ac.uk>
Date: Wed, 01 Sep 1999 13:36:50 +0100
Message-ID: <37CD1DE1.3216DC58@spamme.ed.ac.uk>


Never mind, got it All_Indexes and All_Ind_Columns tables have got me what I want

Thanks

Fraser

Fraser Boswell wrote:

> OK then, Thanks for the advice guys, just as well I got it now and not once this
> is implemented.
> Next question
> In that case I want to store the primary key of the table in a field, each part
> of a composite key delimited by a comma, so I can split it up later and seek the
> required row.
> How do you find in PL/SQL which columns make up the primary key
>
> Fraser
>
> Kenneth C Stahl wrote:
>
> > Fraser Boswell wrote:
> >
> > > I'm recording the RowID of records in an Audit table (thanks Thomas Kyte
> > > for the advice), but was wondering what would destroy the RowID making
> > > it invalid. If all records in the table are copied to a new table, old
> > > table dropped and new table renamed back to the original, would the
> > > RowID be invalid for the new table?
> > > What else would cause the RowID to become out of step with the table?
> > >
> > > Thanks in advance
> > >
> > > Fraser
> >
> > No, it won't be valid. Using a rowid to track records is not a good idea at
> > all. rowid's are never inherited and if you kept a record of them in another
> > table you'd have to ensure that if you delete from the original table then
> > you'd need to delete from the other table as well. Using rowids to track
> > anything would be akin to keeping a list of stack pointer values throughout
> > the life of a program and then having the next run of the program fail if
> > the stack pointer values are different.
Received on Wed Sep 01 1999 - 07:36:50 CDT

Original text of this message

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