sql:mysql:已存在的表新增id并给已有记录生成id

alter table sparksql_hive_test modify id bigint primary key auto_increment ;

然后可以调整表字段顺序:

alter table sparksql_hive_test modify mobile varchar(25) after id

发布了260 篇原创文章 · 获赞 119 · 访问量 51万+

猜你喜欢

转载自blog.csdn.net/weixin_38750084/article/details/103136632