I'm using phpMyAdmin 3.5.1
. I did all the necessary instalation and configuration steps (created the special phpmyadmin
database and tables, set up the pma
user etc.). My phpMyAdmin seems to indicate that everything is set correctly.
My problem is I can't see how to add a comment to a table, or to a specific column. Where is that?
In MySQL, a comment that starts with /* symbol and ends with */ and can be anywhere in your SQL statement. This method of commenting can span several lines within your SQL.
Comment assigned to your table will be visible at the bottom of the first tab called Info, along with other table metadata. To view comments for columns go to Columns tab, and comments will be visible in the last column in the grid.
The syntax to modify a column in a table in MySQL (using the ALTER TABLE statement) is: ALTER TABLE table_name MODIFY column_name column_definition [ FIRST | AFTER column_name ]; table_name. The name of the table to modify.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With