Specifying Multiple Alterations
mysql>
mysql> CREATE TABLE HeadOfState
-> (
-> ID INT NOT NULL,
-> LastName CHAR(30) NOT NULL,
-> FirstName CHAR(30) NOT NULL,
-> CountryCode CHAR(3) NOT NULL
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql>
mysql> ALTER TABLE HeadOfState RENAME TO CountryLeader,
-> MODIFY ID BIGINT UNSIGNED NOT NULL,
-> ORDER BY LastName, FirstName;
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
Related examples in the same category