Mega Code Archive

 
Categories / MySQL / Table Index
 

After the CHANGE keyword, you name the column you want to change, then specify the new definition, which inclu

des the new name. mysql> mysql> CREATE TABLE mytbl     -> (     ->     i INT,     ->     c CHAR(1)     -> ); Query OK, 0 rows affected (0.01 sec) mysql> mysql> mysql> ALTER TABLE mytbl CHANGE i j BIGINT; Query OK, 0 rows affected (0.01 sec) Records: 0  Duplicates: 0  Warnings: 0 mysql> mysql> drop table mytbl; Query OK, 0 rows affected (0.00 sec)