添加评论

评论有三种类型:

 # This comment continues to the end of line

-- This comment continues to the end of line

/* This is an in-line comment */ 

/*
This is a
multiple-line comment
*/

例:

SELECT * FROM t1; -- this is comment

CREATE TABLE stack(
    /*id_user int,
    username varchar(30),
    password varchar(30)
    */
    id int
);

-- 方法要求在注释开始之前在 -- 之后跟一个空格,否则它将被解释为命令并且通常会导致错误。

#This comment works
/*This comment works.*/
--This comment does not.