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 comment on multiple lines of mysql

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

Share

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

This article editor for you a detailed introduction of "mysql how to multi-line comments", the content is detailed, the steps are clear, the details are handled properly, I hope this "mysql how to multi-line comments" article can help you solve your doubts, the following follow the editor's ideas slowly in-depth, together to learn new knowledge.

In mysql, you can use the "/ * * /" comment character to make multiline comments, "/ *" for the beginning of the comment content, and "* /" for the end of the comment content, which can span multiple lines with the syntax of "/ * multiline comment * /".

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

How to comment on multiple lines of mysql

Multiline comments use the / * / comment character. / * for the beginning of the comment content and * / for the end of the comment content. The multiline comment format is as follows:

/ * comment on the first line, comment on the second line * /

Comments are written between / * and * / and can span multiple lines.

Examples of use of multiline comments are as follows

/ * this SELECT statement removes duplicate lines from the result * / SELECT DISTINCT product_id, purchase_price FROM Product

Any comment (single-line comment and multi-line comment) can be inserted in the SQL statement, and the comment can be placed anywhere in the SQL statement.

Insert a single-line comment in the SQL statement, as follows:

SELECT DISTINCT product_id, purchase_price-- removes duplicate rows from the result. FROM Product;SELECT DISTINCT product_id, purchase_price# removes duplicate rows from the result. FROM Product

Insert multiline comments in the SQL statement, as follows:

The SELECT statement SELECT DISTINCT product_id, purchase_price/*, removes duplicate rows from the result. * / FROM Product

Comments can be written in any SQL statement, and there is no limit to the number of comments in the SQL statement.

Read here, this "mysql how to multi-line comments" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, 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: 299

*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

Wechat

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

12
Report