alter table add column default

alter table tableA add columnN NUMBER(4) DEFAULT 0;

此语句会执行很久(当然根据表大小)

可以使用下面两条替代:

alter table tableA add columnN number(4);

alter table tableA modify columnN number(4) default 0;

猜你喜欢

转载自www.cnblogs.com/cnmarkao/p/12732619.html