Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: primary key deferrable initially immediate
All perfectly normal. Check out my site, find "tips", "Administration", and
check out the paper for primary key constraints and what you should know
about them.
Regards
HJR
-- Oracle Resources : http://www.geocities.com/howardjr2000 ======================================== "Ted Chyn" <tedchyn_at_yahoo.com> wrote in message news:44a19320.0110241653.a442c7c_at_posting.google.com...Received on Thu Oct 25 2001 - 03:27:52 CDT
> all,
>
> Is the following listing an expected behavoir for primary key ?
>
> what is 'defferrable initially immediate' to primary constraint and index
?
>
> thnx ted chyn
>
>
> SQL> create table t
> 2 ( x int,
> 3 constraint t_pk primary key (x)
> 4 deferrable initially immediate );
>
> Table created.
>
> SQL> select index_name from user_indexes where table_name='T';
>
> INDEX_NAME
> ------------------------------
> T_PK
>
> SQL> alter table t drop constraint t_pk;
>
> Table altered.
>
> SQL> select index_name from user_indexes where table_name='T';
>
> INDEX_NAME
> ------------------------------
> T_PK ### note index still here
>
> =================
> SQL> create table q (a number, constraint pk_q primary key (a));
>
> Table created.
>
> SQL> select index_name from user_indexes where table_name='Q';
>
> INDEX_NAME
> ------------------------------
> PK_Q
>
> SQL> alter table q drop constraint pk_q;
>
> Table altered.
>
> SQL> select index_name from user_indexes where table_name='Q';
>
> no rows selected #### note index is gone when primary key
constraints
> is dropped.
![]() |
![]() |