Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Server Autonumber equivalent in Oracle 8i

Re: SQL Server Autonumber equivalent in Oracle 8i

From: Robert Martin <rwmartin_at_sisconet.com>
Date: Mon, 20 Nov 2000 14:11:51 -0500
Message-ID: <8vbt3p0vs@enews3.newsguy.com>

I also got this (rather rude) response from an email sent directly to me


What's wrong with reading
a) the Oracle Sql reference manual
b) the Oracle Application Developers Guide

Also *please* do not crosspost to all Oracle newsgroups.

As to your question
create or replace trigger <triggername> before insert on <yourtable> before each row
begin
select <sequence>.nextval
into :new.<keycolumn>
from dual;
end;
/

which you could have easily found consulting the docs.

Regards,

Sybrand Bakker, Oracle DBA Received on Mon Nov 20 2000 - 13:11:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US