Help - Search - Members - Calendar
Full Version: Error With Sql
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
roseinheaven
Hello!
I want to modify a table of my database using this sentence:
CODE
ALTER TABLE name_of_the_table ADD ID INT NOT NULL AUTO_INCREMENT

but when I use this document, I have this error:
CODE
Incorrect table definition; there can be only one auto column and it must be defined as a key


What is wrong?

Thanks.
Alex
It's saying you already have a column with auto_increment and is informing you than any such column must be a primary key.

What's the current table format? DESCRIBE or SHOW CREATE TABLE will give the details needed.
roseinheaven
I don't know what is the table format. Where can I see it?
And I haven't got any column with auto_increment and the table have a primary key :S

Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.