Home  >  Article  >  Database  >  ORA-01758: 要添加必需的 (NOT NULL) 列, 则表必须为空

ORA-01758: 要添加必需的 (NOT NULL) 列, 则表必须为空

WBOY
WBOYOriginal
2016-06-07 17:07:452764browse

ORA-01758: 要添加必需的 (NOT NULL) 列, 则表必须为空

ORA-01758: 要添加必需的 (NOT NULL) 列, 则表必须为空

[日期:2011-12-04] 来源:Linux社区  作者:lwei_998 [字体:]

给一个已经有记录的表添加新列,,并指定not null 时报ORA-01758。怎么办?

1.给新添加的列指定默认值。

2.清空表中的记录再添加新列。

实验如下:

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn