Changing the Table Design (ALTER TABLE)
mysql>
mysql> CREATE TABLE mytable (
-> titleID INT NOT NULL AUTO_INCREMENT,
-> title varchar(100),
-> PRIMARY KEY (titleID)
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql>
mysql> ALTER TABLE mytable CHANGE title title VARCHAR(150) NOT NULL;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
mysql>
mysql> drop table mytable;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category