mysql modify the table comment, the comment field

mysql modify the table comment, the comment field

May 23, 2018

1 when creating the table to write notes
Create Table test1
(
'comment field of' int FIELD_NAME Comment
) Comment = 'table Notes';

Note 2 changes to the table
alter table test1 comment 'annotation modified table';

Note 3 modified field
alter table test1 modify column field_name int comment ' modified Field Comment';
- Note: The field names and types according to the write line

See Table 4 Notes process
- seen in the generated SQL statement
Show Create Table test1;
- see the table in which the metadata
use INFORMATION_SCHEMA;
SELECT * from the TABLE_SCHEMA = TABLES WHERE 'my_db' and TABLE_NAME = 'test1' \ G

5 See comments field method
-show
Show Full Columns from test1;
- see table metadata which
select * from COLUMNS where TABLE_SCHEMA = ' my_db' and TABLE_NAME = 'test1' \ G

Guess you like

Origin blog.csdn.net/weixin_42829146/article/details/86652763