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: Sequences?

Re: Sequences?

From: Heinz Kiosk <no.spam_at_ntlworld.com>
Date: Sat, 16 Feb 2002 10:58:43 -0000
Message-ID: <0_qb8.43235$YA2.6156442@news11-gui.server.ntli.net>


> There is no relationship between MS Access's autonumbering and a SEQUENCE.
The
> autonumering is part of the table and is only capable of sequential
numbering.
> It has no flexibility, no programmability, and is strictly tied to a
single
> table. All it is is the following code built in and hidden from the end
user.
>
> SELECT MAX(numbering_field)
> INTO next_number
> FROM xyz;
>
> INSERT INTO xyz
> (numbering_field + 1, other_field1, other_field2)
> VALUES
> (next_number, someval1, someval2);
>
> Daniel Morgan

Methinks Daniel doth protest too much ;). "All Autonumber/Identity is" is something exteremely useful that answers 99% of needs for this kind of thing. I've never wanted numbers that cut across tables and I've never wanted anything other than incremental numbering in 20 years of db schema design. I agree "create sequence" is more flexible than MS SQL identity or MS Access autonumber or DB2 identity or Sybase....(long boring list of rival technologies snipped); but sequences are also a pain in the arse when all you want is a system generated identity (as supplied in easier form by every other db platform I've ever seen). Also are you seriously suggesting that the above is the algorithm that any db actually uses? I think not. (particularly as you wrote it wrong, SQL syntax error. Also potential problems with above algorithm with transactions and synchronicity. Never mind)

Regards Received on Sat Feb 16 2002 - 04:58:43 CST

Original text of this message

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