Mar*_*ine 210
几种方式:
# Comment
-- Comment
/* Comment */
Run Code Online (Sandbox Code Playgroud)
查看文档.
Din*_*lot 22
"可以使用COMMENT
选项指定列的注释.注释由SHOW CREATE TABLE
和SHOW FULL COLUMNS
语句显示.此选项从MySQL 4.1开始运行.(在早期版本中允许但忽略它.)"
举个例子
--
-- Table structure for table 'accesslog'
--
CREATE TABLE accesslog (
aid int(10) NOT NULL auto_increment COMMENT 'unique ID for each access entry',
title varchar(255) default NULL COMMENT 'the title of the page being accessed',
path varchar(255) default NULL COMMENT 'the local path of teh page being accessed',
....
) TYPE=MyISAM;
Run Code Online (Sandbox Code Playgroud)
fiv*_*git 15
您可以使用单行注释:
-- this is a comment
# this is also a comment
Run Code Online (Sandbox Code Playgroud)
或多线评论:
/*
multiline
comment
*/
Run Code Online (Sandbox Code Playgroud)