Re: SQL Server Autonumber equivalent in Oracle 8i

From: Willy Gielen <wgielen_at_quintessence.net>
Date: Thu, 14 Dec 2000 14:58:10 +0100
Message-ID: <91ajta$gri$02$1_at_news.t-online.com>


I think you're missing the point here. In SQL Server, you don't need to supply the ID column when it is defines as IDENTITY (the same goes for DB2, Mysql, Access, ...). The question was really how to migrate to oracle without rewriting all the inserts in the application. (You still have to change all the JOIN statements though...)

Willy

"Ezr Vinh" <d_a_p_at_my-deja.com> schrieb im Newsbeitrag news:915nga$ne2$1_at_nnrp1.deja.com...
> 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 Thu Dec 14 2000 - 14:58:10 CET

Original text of this message