Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: No automatic indexes
A succesful example below. And BTW it is 9.2.0.7. I assume that it
could be done since the version when disabled constraints appeared. If
I'm not mistaken they wasn't since the world ooops Oracle started :)
Gints Plivna
http://www.gplivna.eu/
SQL> select count(*) from user_indexes where index_name = 'PK_A';
COUNT(*)
0
SQL> create table a (
2 a_id number not null,
3 constraint pk_a primary key (a_id))
4 /
Table created.
SQL> select count(*) from user_indexes where index_name = 'PK_A';
COUNT(*)
1
SQL> drop table a;
Table dropped.
SQL> create table a (
2 a_id number not null,
3 constraint pk_a primary key (a_id) disable)
4 /
Table created.
SQL> select count(*) from user_indexes where index_name = 'PK_A';
COUNT(*)
0
SQL> alter table a enable constraint pk_a;
Table altered.
SQL> select count(*) from user_indexes where index_name = 'PK_A';
COUNT(*)
1
SQL> Received on Thu Jun 15 2006 - 01:59:19 CDT