温馨提示×

mysql怎么给属性添加注释

小新
136
2021-03-22 15:18:14
栏目: 云计算
亿速云mysql数据库,读写分离,安全稳定,弹性扩容,低至0.3元/天!! 点击查看>>

mysql怎么给属性添加注释

mysql给属性添加注释的示例:

mysql创建新表的脚本时添加。

create table test(

id int not null default 0 comment '用户id'

)

如果是已经建好的表,可修改字段的命令,然后加上comment属性定义即可。

alter table test

change column id id int not null default 0 comment '测试表id'

亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>

推荐阅读:mysql怎么给字段添加注释

0