| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Server Autonumber equivalent in Oracle 8i
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 - 11:32:58 CST
![]() |
![]() |