[[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    |                |
 +---------+-------------+------+-----+---------+----------------+

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS