Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Access to Oracle: Converting Autonumber fields
michaelgooding_at_yahoo.co.uk wrote:
> The Oracle-recommended method for converting autonumber fields seems to
> be to use an Oracle Sequence and Trigger, which seems a bit cumbersome;
> is there no alternative ?
>
> Mike Gooding
> ------------
Not only is it not cumbersome it is ridiculously simple.
CREATE SEQUENCE mysequence;
That sure took a lot of work
INSERT INTO mytable
VALUES
(mysequence.NEXTVAL);
Ouch ... my fingers are hurting. Can someone open the bottle of scotch and pour me two fingers ... please? Thanks.
<SORRY TO BE HARSH BUT>
Nothing good happens without some effort. If the above is too much for
you then you should find another occupation.
</SORRY TO BE HARSH BUT>
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Mon Jan 17 2005 - 23:04:32 CST
![]() |
![]() |