Re: AUTO_INCREMENT problems
| From: | Dennis Moore | Date: | Thu, 17 Jan 2002 17:54:14 +0000 |
| Subject: | Re: AUTO_INCREMENT problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80945@lists.php.net to get a copy of this message | ||
Try...
ALTER TABLE patients CHANGE id id MEDIUMINT not null primary key
AUTO_INCREMENT
/dkm
----- Original Message -----
From: "Phil Schwarzmann" <pschwar@jhmi.edu>
To: <php-general@lists.php.net>
Sent: Thursday, January 17, 2002 12:35 PM
Subject: [PHP] AUTO_INCREMENT problems
> I have an exsisting table without any rows. I tried to add a new column
> to it and make it an "auto increment" column. But when I do I get
> this...
>
> ALTER TABLE patients CHANGE id id MEDIUMINT (9) DEFAULT not null
> AUTO_INCREMENT
>
> MySQL said: You have an error in your SQL syntax near '' at line 1
>
> ..what did i do wrong?
>
> Thanks!
>