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 newbie - Sybrand Bakker

Re: SQL newbie - Sybrand Bakker

From: David <dfairman16_at_hotmail.com>
Date: 25 Nov 2002 03:38:08 -0800
Message-ID: <b4cefdce.0211250338.3e4a0344@posting.google.com>


Sybrand Bakker take note.

Note how Howard & FC helped this woman. She is obviously a newbie. There was none of the comment tone you are known for - nothing about wasting bandwidth, nothing about read the manuals, no personal attacks.......

A pleasure to see people helping others, without cutting comment. It's about time you changed your spots.

David Fairman
RJU plc
UK

"Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in message news:<mj8E9.83108$g9.234036_at_newsfeeds.bigpond.com>...
> Yup, it's an error alright.
>
> If you want to find out how to use a sequence to supply a primary key to a
> table, please visit www.jlcomp.demon.co.uk -Jonathan Lewis hosts the
> newsgroup collaborative FAQ there, and this very question is answered there
> (see in particular the answer to How do you create an 'auto number' or 'auto
> increment' column similar to the offering from Microsoft's SQL Server ?)
>
> The short answer is that you don't do it as part of the create table
> statement, but need a before insert trigger to effect the insertion of the
> sequence number.
>
> Regards
> HJR
>
>
> "Miss. Michelle Heigardt" <michelleheigardt_at_hotmail.com> wrote in message
> news:87d7e814.0211240926.a7cc2a8_at_posting.google.com...
> > Hallo, I have the following SQL for creating a table. If you can help
> > me sort out what is wrong I would helpfull.
> >
> > create sequence testsequence;
> > create table testtable(a number primary key, b number
> > testsequence.nextval);
> > insert into testtable values (1034);
> > insert into testtable values (1045);
> > insert into testtable values (32);
> >
> > The error that Oracle says is:
> >
> > create table testtable(a number primary key, b number
> > testsequence.nextval)
> > *
> > ERROR at line 1:
> > ORA-00922: missing or invalid option
Received on Mon Nov 25 2002 - 05:38:08 CST

Original text of this message

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