Using SQL Query:

To change the data type of a column, use MODIFY:

ALTER TABLE table_name MODIFY col_name new_type;

To rename a column, use RENAME COLUMN:

ALTER TABLE table_name RENAME COLUMN old_col_name TO new_col_name;

MODIFY can only be used to change a column definition and RENAME COLUMN can change a column’s name but not its definition. If you want to rename and change the data type of the table at the same time, use CHANGE:

ALTER TABLE table_name CHANGE old_col_name new_col_name new_type;

Using TablePlus GUI Tool:

When viewing a table, you can switch to the structure tab at the bottom of the windows, or you can use shortcut keys Cmd + Ctrl + ]

From there, you can be able to rename or change the data type of any columns simply by double-clicking on the cell.

After that, remember to hit Cmd + S to commit change to the server.

Rename and change data type of column in TablePlus GUI Tool


Need a good GUI Tool for MySQL? TablePlus is a modern, native tool with an elegant UI that allows you to simultaneously manage multiple databases such as MySQL, PostgreSQL, SQLite, Microsoft SQL Server and more.


Download TablePlus for Mac.

Not on Mac? Download TablePlus for Windows.

On Linux? Download TablePlus for Linux

Need a quick edit on the go? Download TablePlus for iOS.

TablePlus GUI Tool MySQL