MySQL

SQL [#vb82453e]

 alter table テーブル名 modify カラム名 型 not null;
 
 例
 alter table moneydata modify money varchar(6) not null;
 mysql> describe moneydata;
 +---------+------------+------+-----+---------+----------------+
 | Field   | Type       | Null | Key | Default | Extra          |
 +---------+------------+------+-----+---------+----------------+
 | monid   | int(11)    | NO   | PRI | NULL    | auto_increment |
 | mondate | date       | NO   |     | NULL    |                |
 | ioid    | int(11)    | NO   |     | NULL    |                |
 | catid   | int(11)    | NO   |     | NULL    |                |
 | money   | varchar(6) | NO   |     | NULL    |                |
 | memo    | text       | YES  |     | NULL    |                |
 +---------+------------+------+-----+---------+----------------+