How to write the remarks code of mysql
Editor to share with you how to write the mysql remarks code, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Method: 1, use "/ *" and "* /" to package the content that needs to be commented, grammar "/ * remarks content * /"; 2, use two horizontal lines followed by remarks content, syntax "- remarks content", the last horizontal line is followed by a space; 3, use the comment attribute to add field notes, syntax "comment"remarks content".
How to type the mysql comments (comments) code? The following article introduces you to some methods of mysql comments (comments) code. There is a certain reference value, friends in need can refer to, hope to help you.
Every language has its own way of annotating, which is fine when the amount of code is small. As the amount of code increases, the importance of code comments becomes more and more prominent.
There are three main ways in mysql:
1. The usual way is the same as those comments in css: / * content * /
/ * alter table cs modify s_age varchar (20) not null default'* /
2. Two horizontal lines, which are commonly used in mysql:-- content (there is a space after the last horizontal line)
-- alter table cs character set utf8
3. Comments for fields or columns are added with the property comment.
Create table cs (id int UNSIGNED not null primary key auto_increment comment "sort", s_name varchar (30) not null default''comment "name", s_age varchar (10) UNSIGNED not null default "comment") engine=innodb default charset=utf8
In the design mode of the table, you can see the comment "your add instructions" that the comments have added for you.
The above is all the contents of the mysql remarks code, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!