tags:

views:

45

answers:

1

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?

+2  A: 

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...

eumiro
Just after I posted this question I stumbled upon this fact. Thanks for answering anyway. :-)
AppleGrew
Reference link: http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
AppleGrew