MySQL中的人生见证
时间:2021-04-06 09:21
每一种语言都有自己的注释方式,代码量越多,代码注释的重要性也就越明显。一般情况下,注释可以出现在程序中的任何位置,用来向用户或程序员提示或解释程序的功能及作用。本文主要介绍 1.字段注释 2.表注释 3.单行注释 a) 单行注释可以使用 b) 单行注释可以使用 4.多行注释 推荐:《mysql教程》 以上就是MySQL中的人生见证的详细内容,更多请关注gxlsystem.com其它相关文章!MySQL
中的注释。create table test1(
id int primary key comment 'user_id'
)
;
create table test2(
id int primary key,
name varchar(20) not null
)comment='table_comment';
#
注释符,#
注释符后直接加注释内容。格式如下:create table test3(
id int primary key,
name varchar(20) not null#偶只是一个单行属性
);
--
注释符,--
注释符后需要加一个空格,注释才能生效。格式如下:create table test4(
id int primary key,
name varchar(20) not null -- 偶是一个--的单行属性
school varchar(20) not null --偶是一个--的单行属性(错误的注释,因为--后面没有空一格)
);
create table test5(
id int primary key,
name varchar(30) not null/*鲲之大,不知其几千里也,
一锅炖不下,故有天眼*/
);