List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 16 2001 7:45pm
Subject:Re: newbie question AUTO_INCREMENT
View as plain text  
At 8:00 PM +0100 10/16/01, Kevin Haughton wrote:
>Hi all,
>after reading the MySQL manual I see there is a AUTO_INCREMENT function.

It's not a function, it's a attribute you can specify for integer columns.
Try entering these statements using the mysql client:

CREATE TABLE t (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t SET id = NULL;
INSERT INTO t SET id = NULL;
INSERT INTO t SET id = NULL;
INSERT INTO t SET id = NULL;
SELECT * FROM t;


>Tried all the examples but couldn't get it to work (man I must be too thick
>for this game ;))
>
>How would I go about setting my column "id" to auto increment? I read as
>much as I could take for 2 days and I'm no clearer on the subject.
>
>many thanks ;)
>
>Karv
>-------------------


-- 
Paul DuBois, paul@stripped
Thread
newbie question AUTO_INCREMENTKevin Haughton16 Oct
  • Re: newbie question AUTO_INCREMENTBill TQO Adams16 Oct
  • Re: newbie question AUTO_INCREMENTPaul DuBois16 Oct
  • Re: newbie question AUTO_INCREMENTDL Neil16 Oct
  • RE: newbie question AUTO_INCREMENTJindo Soul19 Oct