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 use comments in mysql

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how to use annotations in mysql". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

There are four kinds of comments in mysql: 1, single-line comment "--syntax"-- comment content "; 2, single-line comment" # ", syntax" # comment content "; 3, multi-line comment" / * / ", syntax" / * comment content * / "; 4, inline comment" / *! comment content * / ".

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

Four comments in mysql

NO1:-- comment content

This annotation method does not implement multiline comments, but it is important to note that there is a space after it. (- the following content will not be recognized, so you need to put a semicolon on the next line to end the statement)

NO2:# comment content

This annotation method also does not implement multiline comments.

NO3:/* comments * /

This kind of comment can implement multi-line comments.

Insert a picture description here

NO4PUR PUBG! Comment content * /

This kind of comment is called inline comment in mysql, when! When the database version number is followed, when the actual version is equal to or higher than that string, the application interprets the comment content as SQL, otherwise it will be treated as a comment. By default, when there is no version number, the contents will be executed.

This is the end of the content of "how to use comments in mysql". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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