对数据库表中字段的操作
对数据库表中字段的操作
以表user_info为例
1、添加字段
alter table user_info
add sex tinyint(1) default 0 comment '性别0-男 1-女',
add birth date not null comment '出生日期'
在指定字段password后添加字段:
alter table user_info
add mobile char(11) comment '手机号'after password
2、修改字段
alter table u
原创
2021-04-18 14:23:57 ·
127 阅读 ·
0 评论