改变字段的默认值:
- 为已有的字段添加默认值
ALTER TABLE table_name ALTER COLUMN column_name SET DEFAULT default_value;
- 删除默认值
ALTER TABLE table_name ALTER COLUMN column_name DROP DEFAULT;
ALTER TABLE table_name ALTER COLUMN column_name SET DEFAULT default_value;
ALTER TABLE table_name ALTER COLUMN column_name DROP DEFAULT;