MySQL

primary key [#y870920d]

 alter table テーブル名 add primary key(カラム);

auto increment [#ia0f30b7]

 alter table テーブル名 modify catid int auto_increment;

確認 [#x410a493]

 describe テーブル名;
 +---------+-------------+------+-----+---------+----------------+
 | Field   | Type        | Null | Key | Default | Extra          |
 +---------+-------------+------+-----+---------+----------------+
 | catid   | int(11)     | NO   | PRI | NULL    | auto_increment |
 | catname | varchar(10) | YES  |     | NULL    |                |
 +---------+-------------+------+-----+---------+----------------+