温馨提示×

mysql怎么给属性添加注释

小新
132
2021-03-22 15:18:14
栏目: 云计算

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'


0