Differences between single-line comments and multiline comments for MySQL and SQL

Source: Internet
Author: User

Here, allow me to explain the MySQLServer and SQL Server annotations together

1. Single-line Comment

1) in MySQL, you can use "--" and "--" to annotate

-- Mode 1: Single-line Comment-- Create Database TestDB;

2) in SQL, you can use "---" and "--" to annotate

-- Mode 1: Single-line Comment-- Create database TestDB;

Above, we can see that the single-line comment in MySQL is more than a space in SQL

2, multi-line Comment

1) in MySQL, use/* and/* to annotate

/**/Createdatabase  testdb; /* * * Method 2: Multiline Comment * */ Create database TestDB;

2) in SQL, annotate with/* and/*

/* Method 1: Multiline Comment */ Create Database TestDB; /* * * Method 2: Multiline Comment * */ Create database TestDB;

By comparison, MySQL and SQL have a little difference in single-line comments, multi-line comments are the same, we recommend using multiple lines of annotation

Differences between single-line comments and multiline comments for MySQL and SQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.