alter table supplier_seller add column company_id int null comment '供应主体id';
默认情况下,添加的列会添加到最后一列。
如果要求添加到指定位置,语句如下:
alter table supplier_seller add column company_id int null comment '供应主体id' after mdm_info_json;
如果想要添加到第一列,语句如下:
alter table supplier_seller add column company_id int null comment '供应主体id' first ;
如果要求不可为空,语句如下:
alter table supplier_seller add column company_id int not null comment '供应主体id';
alter table supplier_seller comment '联营商'; 以上语句是给supplier_seller表添加注释:联营商
alter table supplier_seller modify company_name varchar(50) comment '供应主体名称';
以上语句是给supplier_seller表的company_name列添加注释:供应主体名称
如对本文有疑问, 点击进行留言回复!!
【MySQL牛客】10.获取所有非manager的员工emp_no
网友评论