views:

436

answers:

1

I'm trying to execute this simple command:

create table foo
(clo int primary key unsigned auto_increment);

But I get this error:

ERROR 1064 (42000): 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 auto_increment)' at line 2

+1  A: 

I tried putting int and unsigned together and it worked fine:

create table foo
(clo int unsigned primary key auto_increment );
codaddict
Thanks, that fixes the problem.
m4design