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

Re: SQL newbie

From: Peter Gulutzan <pgulutzan_at_ocelot.ca>
Date: 26 Nov 2002 06:35:00 -0800
Message-ID: <36c478c6.0211260635.48027b8a@posting.google.com>


"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.
>

Yes, the confusion can arise because SQL Server auto-numbers differently. I have an online article in the current issue of dbazine.com comparing the internals: "Sequences and Identities" http://dbazine.com/gulutzan4.html

Peter Gulutzan Received on Tue Nov 26 2002 - 08:35:00 CST

Original text of this message

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