Add or change comment for MySQL table or column?

Table comments are in the "operations" tab; column comments are via editing the column.


A quick reference or check-list (for phpMyAdmin version 4.0.1):

a) table comment:

  • when creating new table: below columns list, Table comments field, next to Storage Engine,

  • when changing comment for existing table: Operations > Table options > Table comments.

b) column comment: always as one of last columns (Comments) in add / change columns view.

Note, that while column's comment length is unlimited (very long anyway; managed to add comment with 2000 characters), table's comment length is limited to only 60 characters (not quite much). I don't know, from where does this limitation come from (MySQL or phpMyAdmin), but it is surely odd and should be replaced -- in most cases, you have to write a much more comment for entire table than for one column.


@trejder's answer is perfect for phpMyAdmin. For anyone looking for table comment in MySQL Workbench: When creating or editing a table, click on the downward arrow next to the table name and schema on the far top right, there you can view/edit the comment.

enter image description here

You can also view the comment by right-click on the table > Table Inspector, you will find it in the bottom.

enter image description here

Tags:

Phpmyadmin