新增非空列:

alter table t_test add column user_id integer;
update t_test set user_id=0;
alter table t_test alter column user_id SET NOT NULL;

 

相关文章: