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.thurgood@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+unsubscribe@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
Context
Re: [libreoffice-users] LO Base Problem · SOS
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.