Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to put more words in the comment attribute of MySQL field
How to put more words in the comment attribute of MySQL field
In MySQL database,

Comments for fields or columns are added with the property comment.

In the script for creating a new table,

You can add comments by adding the comment attribute to the field definition script.

The sample code is as follows:

Create a table test (

Id int not null defaults to 0 Note' User ID'

)

If it is an artificial watch,

You can also use the command to modify fields, and then add annotation attribute definitions to add annotations.

The sample code is as follows:

Change form test

Change column id id int not null default value 0 Note' Test Table id'

It is known to add comments to fields or columns of a table.

So, how do you view the comments of all fields in an existing table?

You can view it with the command: show full columns from table.

Examples are as follows:

Displays the complete column of the test;