Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Why Oracle don't have AUTO_INCREMENT as in MySQL
> Not at all. Surrogate keys have their place in the real world.
>
> What I don'tlike is forced serialization of autoincrementing.
Agreed
> What I don't like is tying the surrogate to a single object.
Agreed, if you mean "always tying"
> The Oracle sequence is a far more intelligent way to solve the problem.
Daniel... I think that nobody wants to drop sequences. They are a great tool.
However, sequences are pretty often used to provide a unique primary key for a single table.
Repeatedly implementing this scenario with sequences is verbose and/or error-prone.
What people would like is to *supplement* sequences with a declarative way to tell oracle : Please provide a unique value for this primary key if none specified.
Something like DB2, which - as I get it - has both SEQUENCEs and IDENTITY columns... Received on Sun Apr 22 2007 - 00:10:26 CDT