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 -> auto-increment?

auto-increment?

From: Luke <anduguid_at_NOThome.com>
Date: Sat, 07 Apr 2001 19:39:52 GMT
Message-ID: <c2Kz6.222185$tP3.3388628@news1.rdc1.bc.home.com>

g;day,
is there a way to do this with oracle?

CREATE TABLE cookbooktb (
  id int(11) NOT NULL auto_increment,
  user_recipe_name varchar(60),
  recipe_category_id int(11),
  ingredients text,
  preparation text,
  notes text,
  PRIMARY KEY (id)
);

most notably the auto_increment part? or is it up to the programmer to increment it manually for each insertion?

i got this far...

SQL> describe cookbooktb;

 Name                                      Null?    Type
 ----------------------------------------- -------- ------------------------
----
 ID                                        NOT NULL NUMBER(11)
 USER_RECIPE_NAME                                   VARCHAR2(60)
 RECIPE_CATEGORY_ID                                 NUMBER(11)
 INGREDIENTS                                        VARCHAR2(2000)
 PREPERATION                                        VARCHAR2(2000)
 NOTES                                              VARCHAR2(2000)


NB. the create table sql above was taken from a mysql DB dump.

luke

--
***remove the NOT from the email address***
Received on Sat Apr 07 2001 - 14:39:52 CDT

Original text of this message

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