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

Home -> Community -> Usenet -> c.d.o.tools -> Re: auto increment...

Re: auto increment...

From: Ted Knijff <knijff_at_bigfoot.com>
Date: Sat, 09 Dec 2000 12:44:59 GMT
Message-ID: <3a32294a.9913685@news.online.de>

Yep. He didn't say that you first have to create a sequence such as :  create sequence fooseq nocache

ps. Oracle is a whole lot more and better than MySql for larger systems, and therefore a lot more work.

Ted

On Sat, 09 Dec 2000 03:27:09 GMT, schnurmann_at_my-deja.com wrote:

>Holy cow...
>
>In article <90rmvv$2825k$1_at_ID-62141.news.dfncis.de>,
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>> create trigger foobri before insert on foo for each row
>> begin
>> select fooseq.nextval
>> into :new.id
>> from dual;
>> end;
>> /
>> and that's all there is.
>>
>> Regards,
>>
>> Sybrand Bakker, Oracle DBA
>>
>> <schnurmann_at_my-deja.com> wrote in message
>> news:90rju2$6pg$1_at_nnrp1.deja.com...
>> > Ok, I'm lost. According to the docs the use of a sequence is good
 as a
>> > primary key. For the life of me I cannot create a table that uses
 the
>> > sequence. In mySQL this is so easy with auto_increment. How does
 one
>> > do this in Oracle??
>> >
>> >
>> > Sent via Deja.com http://www.deja.com/
>> > Before you buy.
>>
>>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

EMail: knijff_at_bigfoot.com Received on Sat Dec 09 2000 - 06:44:59 CST

Original text of this message

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