Re: column populated from sequence

From: Ron Reidy <rereidy_at_indra.com>
Date: Mon, 26 Nov 2001 16:20:47 -0700
Message-ID: <3C02CE4F.2F8F0041_at_indra.com>


Stjepan Brbot wrote:
>
> When I insert the new row in such a table, ID column of table gets new
> value from sequence so I knew what is the last number of sequence, but
> if I execute query "SELECT sequence_name FROM all_sequences WHERE
> last_number=nnn" where nnn is known last number, I get nothing. There is
> no sequence with last number nnn? Am I doing something wrong?
>
> --
>
> Stjepan Brbot <Stjepan.Brbot_at_ZG.HiNet.HR>
>
> "Jim Kennedy" <kennedy-family_at_home.com> wrote in message
> news:xQeM7.77973$XJ4.41893655_at_news1.sttln1.wa.home.com...
> > I would look in the trigger on the table specifically the insert
> trigger.
> > Then I would take a look at the names of the sequences to see if
> someone
> > used a reasonable naming convention.
> > Then I would look to see if I could narrow down the choices based upon
> the
> > highest value in the column and the next value in a sequence (assuming
> very
> > few people are using the application at that time.)
> > Jim
> > "Stjepan Brbot" <Stjepan.Brbot_at_ZG.HiNet.HR> wrote in message
> > news:9trrln$e6ig$3_at_as201.hinet.hr...
> > > How to find out from which sequence an ID column in table is
> populated?
> > > Where is the connection?
> > >
> > > --
> > >
> > > Stjepan Brbot <Stjepan.Brbot_at_ZG.HiNet.HR>
> > >
> > >
> > >
> >
> >
Read the docs on sequence numbers. They are not like tables. There are [Quoted] no "real" columns (next_val and curr_val are pseudo-columns).

[Quoted] Someone previously described looking at PRE-INSERT triggers to determine [Quoted] what sequqnce is being used. Did you do this (hint: look at the view USER_TRIGGERS or ALL_TRIGGERS and figure out the query from here).

-- 
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
Received on Tue Nov 27 2001 - 00:20:47 CET

Original text of this message