Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: adjust seq
Why do you wish to do this? The table you have looks like it has a primary key , generated by means of a sequence. If this is the case why does the PK value need to be change at all.
-- Niall Litchfield Oracle DBA Audit Commission UK <eastking_at_my-deja.com> wrote in message news:8ov4vf$n3o$1_at_nnrp1.deja.com...Received on Wed Sep 06 2000 - 10:42:56 CDT
> Hi , every one here.
>
> I have a table as following
>
> Seq value
> -----------
> 1 aaa
> 2 bbb
> 3 ccc
>
> When I delete the second record , I want it be adjust to be as following
>
> Seq value
> -----------
> 1 aaa
> 2 ccc
>
> As you can see , the '3' has been changed to '2', The Seq had been
> rearranged. I do not want to use trigger to achieve it.
>
> How can I do that? of course, one SQL is most approved.
>
> Thanks a lot
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
![]() |
![]() |