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: New Id usign max(id)

Re: New Id usign max(id)

From: Jason King <jhking_at_airmail.net>
Date: Thu, 06 Oct 2005 16:54:15 -0500
Message-ID: <11kb7879ss6rh75@corp.supernews.com>


mike wrote:

> I don't have a problem with sequence, its just that I'll need to start
> a new sequence for every NUM that happened to be created.
>
> That is not do-able is it? I think I'd just have to have 1 sequence
> and mytable would end up looking like:
>
> NUM ID
> 1 1
> 1 2
> 1 3
> 2 4
> 2 5
> 2 6
>
> Correct?
>

That's my suggestion unless there's some business reason to duplicate ids. If id has a meaning to your users like line_number within invoice, then this won't work. If id is something the users don't see then avoid   the multi-column pk and just set up id as a straight sequence. Received on Thu Oct 06 2005 - 16:54:15 CDT

Original text of this message

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