|
-
It works when we first create a non-unique index on the PK column.
This example is made on 8.1.6.2
> create table aa ( a number );
Table created.
> insert into aa ( a ) values ( 1 ) ;
1 row created.
> /
1 row created.
> insert into aa ( a ) values (2 ) ;
1 row created.
> create index aa_i on aa ( a );
Index created.
> alter table aa add constraint aa_pk primary key ( a ) novalidate ;
Table altered.
> select a from aa;
A
----------
1
1
2
3 rows selected.
> insert into aa ( a ) values ( 2 );
insert into aa ( a ) values ( 2 )
*
ERROR at line 1:
ORA-00001: unique constraint (DWH.AA_PK) violated
> insert into aa ( a ) values ( 3 ) ;
1 row created.
> /
insert into aa ( a ) values ( 3 )
*
ERROR at line 1:
ORA-00001: unique constraint (DWH.AA_PK) violated
Regards
Gert
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|