![]() I need to add a new column to an existing table. I asked this question before in other forums but I have not received any reponse so far. SQL> select index_name,uniqueness from user_indexes where table_name='MYTEST' ORA-00001: unique constraint (CR.AA) violated SQL> analyze table mytest compute statistics for table for all indexes for all indexed columns Ġ SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=2)ġ 0 INDEX (RANGE SCAN) OF 'MYTEST_IDX' (NON-UNIQUE)Ĥ25 bytes received via SQL*Net from client ![]() SQL> create table mytest as select rownum rno from user_objects where rownum create index mytest_idx on mytest(rno) ġ* alter table mytest add constraint aa primary key(rno) Also a primary key can even work if there is some non-unique index on the column you are trying to "Declare" as primary key. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |