AppleGrew
AppleGrew

Reputation: 9570

Where is the error in my SQL query?

My SQL query is

ALTER TABLE `USERS` MODIFY `UUID` SERIAL UNSIGNED NOT NULL AUTO_INCREMENT

but I keep on getting

#1064 - 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 'UNSIGNED NOT
NULL AUTO_INCREMENT' at line 1

from MySQL (version 5.1). :-(

Any pointers?

Upvotes: 0

Views: 71

Answers (1)

eumiro
eumiro

Reputation: 212835

From MySQL Doc:

SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.

That's why you don't have to add more attributes to it...

Upvotes: 2

Related Questions