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