mysql comments
mysql comment
Table comment
add comment during creating table
create table mytable(
id int not null default 0 comment 'user id') comment='table comment'
alter table comment
alter table mytable comment 'table comment'
check table moment
show create table <mytable>
show table status where name='mytable'
select table_name, table_comment from information_schema.tables where table_name='mytable'
Column comment
add comment during creating table
create table mytable(
id int not null default 0 comment 'user id')
alter column comment
alter table mytable modify column <fiedld_name> <type> comment 'column comment'
check table comment
show full columns from table
select column_name, column_comment from information_schema.columns where table_name='mytable'