I just checked on my MySQL, and the correct syntax is "modify", not
"change", for the alter table statement. "Change" is for changing the
name, I think.

Also, the size of the int data type isn't necessary, but specifying
"primary key" if the field is already the primary key results in a
"Multiple primary key defined" error. Just omit the primary key part if
it is already defined as the primary key, it will keep that constraint.

So the correct syntax should be:

alter table Members modify RecordID int unsigned not null
auto_increment;

Hope that does the trick.


Paul


On Mon, 23 Feb 2015 22:20:22 +0100
Alex Thurgood <alex.thurg...@gmail.com> wrote:

> Le 22/02/2015 22:36, Ian Whitfield a écrit :
> > 
> 
> 
> > |ALTER TABLE Members CHANGE RecordID1 INT UNSIGNED NOT NULL
> > AUTO_INCREMENT PRIMARY KEY
> 
> Try it again, adding the length of field to the INT definition
> 
> ALTER TABLE Members CHANGE RecordID INT(10) UNSIGNED NOT NULL
> AUTO_INCREMENT PRIMARY KEY
> 
> 
> 
> 
> 
> 
> 
> 


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to