Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Unique Constraint Error when Altering a Table
We are running Oracle 7.3. On our system we successfully alter a table with a command like the following:
ALTER TABLE table_name
ADD
(column VARCHAR(1) DEFAULT 'Y' NOT NULL);
This works whether there is data present or not. If rows are
present, the default
value is populated throughout the existing rows.
On another Oracle 7.3 database, this statement does not work and
returns the
error
ERROR at line 1:
ORA-00001: unique constraint (.) violated.
Both databases are the same schema setup. We've checked for
extra constraints
on the non-working database; there aren't any. The only
constraint on the table is
its primary key constraint. It's worked on 4 other systems; but
fails on one.
Also, on the system it fails on, I can create a temporary table
and perform the
same alter statement and it will work. Also, there are triggers
on the table, but they
were disabled during one test; and it still failed. I know that
I can probably break
the statement up into pieces to make it work; but I really want
to know why and what
is causing the errors.
Can anyone give me some idea of what could be wrong/different on
the other system
to cause this? All 4 systems are at Oracle 7.3.2.3 (running on
an NCR box).
Received on Tue Jun 24 1997 - 00:00:00 CDT
![]() |
![]() |