Re: SQL Server Autonumber equivalent in Oracle 8i

From: Ezr Vinh <d_a_p_at_my-deja.com>
Date: Tue, 12 Dec 2000 17:32:58 GMT
Message-ID: <915nga$ne2$1_at_nnrp1.deja.com>


[Quoted] You should be able to do this without bothering with the trigger at all.  Just make a direct reference to the sequence in your insert statement.  For example:

INSERT INTO MYTABLE (ID, NAME)
VALUES (ID_SEQ.NEXTVAL, "My Name");

ID_SEQ is the name of the sequence object that you created.

-D

Sent via Deja.com
http://www.deja.com/ Received on Tue Dec 12 2000 - 18:32:58 CET

Original text of this message