Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Question about Append hint in Insert

RE: Question about Append hint in Insert

From: <Jared.Still_at_radisys.com>
Date: Mon, 21 Jun 2004 11:47:57 -0700
Message-ID: <OFDBECAAA7.25FDD886-ON88256EBA.0066FC6D-88256EBA.00673FE5@radisys.com>


> you can disable the constraint without the need to drop the index;
You may also do that with an index created as part of the primary key constraint:

11:47:28 SQL>drop table x;

Table dropped.

11:47:28 SQL>
11:47:28 SQL>create table x
11:47:28   2  as
11:47:28   3  select distinct object_name
11:47:28   4  from user_objects
11:47:28   5  /

Table created.

11:47:28 SQL>
11:47:28 SQL>alter table x add constraint x_pk
11:47:28   2  primary key(object_name)
11:47:28   3  /

Table altered.

11:47:28 SQL>
11:47:28 SQL>select index_name , uniqueness, status
11:47:28   2  from user_indexes
11:47:28   3  where table_name = 'X'
11:47:28   4  /

INDEX NAME                     UNIQUENES STATUS
------------------------------ --------- --------
X_PK                           UNIQUE    VALID

1 row selected.

11:47:28 SQL>
11:47:28 SQL>select constraint_name, constraint_type, status
11:47:28   2  from user_constraints
11:47:28   3  where table_name = 'X'
11:47:28   4  /

CONSTRAINT_NAME                C STATUS
------------------------------ - --------
X_PK                           P ENABLED

1 row selected.

11:47:28 SQL>
11:47:28 SQL>alter table x disable primary key keep index;

Table altered.

11:47:28 SQL>
11:47:28 SQL>select index_name , uniqueness, status
11:47:28   2  from user_indexes
11:47:28   3  where table_name = 'X'
11:47:28   4  /

INDEX NAME                     UNIQUENES STATUS
------------------------------ --------- --------
X_PK                           UNIQUE    VALID

1 row selected.

11:47:28 SQL>
11:47:28 SQL>select constraint_name, constraint_type, status
11:47:28   2  from user_constraints
11:47:28   3  where table_name = 'X'
11:47:28   4  /

CONSTRAINT_NAME                C STATUS
------------------------------ - --------
X_PK                           P DISABLED

1 row selected.

11:47:28 SQL>



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon Jun 21 2004 - 13:45:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US