MySQL Forums
Forum List  »  Newbie

AUTONUMBER
Posted by: Alin Brin
Date: March 27, 2005 07:41AM

I have a query to generate an autonumber, but it tells me that:

Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ZEROFILL NOT NULL, electionID INT(10) NOT NULL, name VARCHA

This is my query:

CREATE TABLE group7.Candidates (
candidateID INT(10) AUTO_INCREMENT ZEROFILL NOT NULL,
electionID INT(10) NOT NULL,
name VARCHAR(32) NOT NULL,
PRIMARY KEY(candidateID),
FOREIGN KEY(electionID) REFERENCES Election(electionID)
);

could you please help me out with the syntax so that the autonumber will work

Thank you in advanced

Alin B.

Options: ReplyQuote


Subject
Written By
Posted
AUTONUMBER
March 27, 2005 07:41AM
March 27, 2005 08:23AM
March 27, 2005 08:57AM
March 27, 2005 08:50AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.