每一种语言都有它的注释方式,代码量少的时候还可以,随着代码量越来越多,代码注释的重要性也越发凸显。

  在mysql中主要有三种方式:

  1、常用的方式,跟在css中那些注释一样 :/* 内容 */

/* alter table cs modify  s_age  varchar(20) not null default '' */

  2、两条横线,mysql中通用的方式,一般都用这个: -- 内容(最后一条横线后有空格)

-- alter table  cs  character set utf8

  3、 字段或列的注释是用属性comment来添加。

 create table cs(

      id int UNSIGNED not null primary key auto_increment  comment "排序",

      s_name varchar(30) not null default ''  comment "姓名",

      s_age  varchar(10) UNSIGNED not null default '' comment "年龄" 

 )

  engine=innodb  default charset=utf8;

  可在表的设计模式中 ,看到注释为你添加的 comment ' 你的添加说明' 的内容

MySql注释的写法的更多相关文章

  1. MySQL注释符

    mysql注释符有三种:1.#...(注释至行末,推荐)2.-- ...(两条短线之后又一个空格)3./*...*/(多行注释) 1.

  2. [转]hive metadata 存mysql 注释中文乱码的有关

    FROM : http://blog.csdn.net/tswisdom/article/details/41444287 hive metadata 存mysql 注释中文乱码的问题 hive me ...

  3. python中注释的写法

    说明: 记录在python中注释的写法. 1.单行注释,代码行以 # 开头 # 这是一个单行注释 print('hello world') 2.多行注释,使用三个单引号,或者三个双引号将其要注释的内容 ...

  4. 为MYSQL加注释--mysql注释符

    上午插入记录的时候一直没有成功,郁闷不知道为什么.因为是很多条记录一起插入,中间一些不用的数据就用"--"来注释了,结果没有效果. 没有办法,在网上找了找,才发现注释符" ...

  5. MySQL注释符号

    今天在执行mysql语句时很奇怪为什么没有执行,查询后发现“-- ”是mysql的注释符号,不会执行的  mysql注释符有三种: 1.#... 2."-- ",注意--后面有一个 ...

  6. 动软生成器添加Mysql注释

    1.解决没有mysql注释问题 替换原文件下载地址 2.更新Models模板 <#@ template language="c#" HostSpecific="Tr ...

  7. mysql批量更新写法

    mysql批量更新写法<pre> $namedmp=filter($_POST['namedmp']); $namedsp=filter($_POST['namedsp']); $name ...

  8. MYSQL注释

    MYSQL扩展了SQL的注释/**/, /*! (语句)#加感叹号,内部语句会被执行 */ /*!50001 select * from test #表示数据库为5.00.01版本,内部语句会被执行 ...

  9. oracle数据库兼容mysql的差异写法

    1.sysdate改为sysdate(),或者now(); 2.nvl(expr1,expr2) 改为IFNULL(expr1,expr2) nvl2(expr1,expr2,expr3)改为 IF( ...

随机推荐

  1. 经典批处理实现自动关机(BAT)

    经典批处理实现自动关机1.BAT @ECHO offTITLE 自动关机程序 作者:廖晓青 :startCLSCOLOR 1frem 使用COLOR命令对控制台输出颜色进行更改MODE con: CO ...

  2. python的subprocess模块介绍

    一.subprocess以及常用的封装函数运行python的时候,我们都是在创建并运行一个进程.像Linux进程那样,一个进程可以fork一个子进程,并让这个子进程exec另外一个程序.在Python ...

  3. Redis自定义fastJson Serializer

    public class FastJsonRedisSerializer<T> implements RedisSerializer<T> { public static fi ...

  4. java生成订单编号

    随着项目用户数量的扩大,高并发随之而来.那么如何在当前系统生成唯一编号呢? 一台数据库可以用自增,集群呢?当然也有随之的解决方案,但是最好的还是在项目生成了唯一的编号再插入到数据库.而不是数据库插入了 ...

  5. HTTP协议复习

    HTTP请求/响应的步骤: 客户端连接到WEB服务器:浏览器与web服务器的HTTP端口建立一个TCP套接字连接,例如:http://www.baidu.com 发送HTTP请求:通过TCP套接字,客 ...

  6. 泡泡一分钟:Teaching Robots to Draw

    Teaching Robots to Draw 教会机器人画画https://h2r.cs.brown.edu/wp-content/uploads/kotani19.pdf Atsunobu Kot ...

  7. 数据分析入门——pandas之数据合并

    主要分为:级联:pd.concat.pd.append 合并:pd.merge 一.numpy级联的回顾 详细参考numpy章节 https://www.cnblogs.com/jiangbei/p/ ...

  8. Jmeter-Critical Section Controller(临界区控制器)(还没看,是一个控制请求按顺序执行的东东)

    The Critical Section Controller ensures that its children elements (samplers/controllers, etc.) will ...

  9. [LeetCode] 195. Tenth Line 第十行

    Given a text file file.txt, print just the 10th line of the file. Example: Assume that file.txt has ...

  10. [LeetCode] 260. Single Number III 单独数 III

    Given an array of numbers nums, in which exactly two elements appear only once and all the other ele ...