
Using WinMySQL Professional
Modify column

Only accessible when connected and when a table is active, the «Table management>Modify column» submenu allows a table alteration with a column structure modification. The user who wants to perform this operation must have, at least the «Can ALTER» privilege. WinMySQL Professional disables this menu when the active database is «mysql» to prevent any table alteration which may lead to an unrecoverable crash of the MySQL® server.
How to modify a column ?
To modify a column, invoke the «Table management>Modify column» submenu by clicking on it or by using the «Ctrl-F4» shortcut. Then, the column list of the current table appears. Select which you want to process and click on the «Select» button. After the column selection, the «column setup» window appears with the selected column properties edited. This window is very similar with the center part of the «Table structure» screen of the «File>New MySQL® table» submenu and it works quite in the same way, excepted the contextual menu which permits a quick access to columns types is disabled here.
Select the new column type in the type combo box list if you want to change it.
If the column type requires a format, select it with the enabled spin fields «Num» and «Dec» using the «Up» and «Down» arrows or entering the wanted value, directly in the field.
If the «type options» combo box suggests options, you may select in the list. Anyway, you may enter what you want in the combo box field (this feature allows a compatibility with future releases of MySQL® server)
If the selected type is an «enum» or a «set», manage the set members with the «Enum or Set type values» groupbox : enter a value in the blank field, click on the «Add value button», etc ...You may either want to delete a member if the edited column is a «set» or an «enum» ; select the which you wish to eliminate and click on the «Del value» button. If you already have saved a *.set file or you want to write it with a plain text editor, you may load it clicking on the «Load set» button. At the opposite, you can save the current set clicking on the «Save set» button.
If you want to specify a column option, you may enter what you want in the «Column option» combo box which suggests nothing in this context (this feature allows a compatibility with future releases of MySQL® server)
Then, click on the «Validate» button to complete the procedure (or click on the «Quit» button to cancel)
Warning : if a modified column contained data before, MySQL® will try to do all it can to keep it, transtyping or truncating when possible, but when it can't, it will discard all the incompatible data.