add comment to a mysql column

by Prakash 2013-08-03 18:35:59

The following query adds comments to a mysql column when adding a table field.


alter table mytable add myfield tinyint default 0 comment 'This is my comment';


If the column preexists use the following command to change the column field :


alter table mytable change myfield myfield tinyint default 0 comment 'This is my comment';

Tagged in:

1813
like
0
dislike
0
mail
flag

You must LOGIN to add comments