i have a table and i am trying to add an unique primary id field which is also autoincrement.the mysql query is like this:
"ALTER TABLE test1 ADD index_column SMALLINT not null AUTO_INCREMENT;"
i get a error" incorrect table definition:there can be only one auto field and it must be defined as a key"
what is the right query to solve this ?
"ALTER TABLE test1 ADD index_column SMALLINT not null AUTO_INCREMENT;"
i get a error" incorrect table definition:there can be only one auto field and it must be defined as a key"
what is the right query to solve this ?