Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the remarks code of mysql

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report