WeiKing
  1. # 和--:
    1. 都是单行注释 ,-- 后面要加一个空格
    2. 一条语句如果分成多行写,每行后面都可以用# 和--;一条语句如果只写一行,则# 和--只能写在行末尾,不能写在行中间
    3. 单行注释建议用#
  2. /* 注释 */:
    1. 多行注释,可以注释多行
    2. 可以用于一行语句任意位置进行注释
  3. comment:
    1. 表中的字段或列的注释是用属性comment来添加
    2. 存储过程中可以comment特征来添加注释
  4. 实例:
    create table tb_name -- this is a table
    (id int(11));  √
    create table tb_name0 -- this is a table (id int(11)); ×
    create table tb_name1  (id int(11)); #this is a table √
    create table tb_name2 /*this is a table*/ (id int(11));
    create table tb_name3  (id int(11) comment \'this is a table\'); √

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-20
  • 2022-02-07
  • 2021-09-18
  • 2022-02-07
  • 2021-04-19
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2021-11-17
  • 2021-07-29
  • 2021-10-08
  • 2022-02-07
  • 2021-10-02
  • 2022-01-06
相关资源
相似解决方案