-- 增加字段及注釋
alter table sr_zjff_main add zjbzjxbj int(1) DEFAULT '0' COMMENT '';
alter table sr_main_ylyj add yljzje double(20,2) DEFAULT '0.00' COMMENT '醫療救助金額';
-- 修改字段默認值語法:
alter table sr_main_sjzhk alter column MXSRS drop default; (若本身存在默認值,則先刪除)
alter table sr_main_sjzhk alter column MXSRS set default 1;(若本身不存在則可以直接設定)
-- 屬性改注釋
alter table sr_main_zdts modify column bmbh VARCHAR(10) comment '數據源部門';
-- 修改表注釋
alter table test1 comment '修改后的表的注釋';
-- 查看表注釋
show create table sr_main_zdts;
-- 查看表屬性注釋
show full columns from sr_main;