comment in mysql workbench code example

Example 1: mysql comment

-- This is a SQL Comment

/* 
This is a multi-line
SQL comment 
*/

Example 2: how do you comment in mysql workbench

mysql> SELECT 1+1;     # This comment continues to the end of line
mysql> SELECT 1+1;     -- This comment continues to the end of line
mysql> SELECT 1 /* this is an in-line comment */ + 1;
mysql> SELECT 1+
/*
this is a
multiple-line comment
*/
1;

Example 3: comments in mysql

#this is a comment
-- this is a comment but requires a whitespace/tab/newline after the double -

Tags:

Sql Example