mysql table to add notes, field notes, view and modify comments

Reproduced in: https://www.cnblogs.com/xsj1989/p/6795382.html

mysql table to add notes, field notes, view and modify comments

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

Note 2 changes to the table
'Note modified table' ALTER Table test1 Comment;

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

Display annotated method 4
- viewed in the generated SQL statement
Show Create table test1;
- See table metadata which
use INFORMATION_SCHEMA;
SELECT * from the TABLE_SCHEMA = tABLES WHERE 'my_db' and TABLE_NAME = 'test1' \ G

. 5 view fields annotation method
--show
Show Full Columns from test1;
- meta data table See inside
select * from COLUMNS where TABLE_SCHEMA = ' my_db' and TABLE_NAME = 'test1' \ G

Guess you like

Origin blog.csdn.net/qq_28817739/article/details/88701805