mysql怎么给属性添加注释

1201
2021/3/22 15:18:14
栏目: 云计算
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

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'


辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: mysql怎么用命令添加属性