Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> auto-increment?
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