Search notes:

Oracle: Primary key constraint

Naming the index of the primary key

create table tq84_tab (
   id   number /*not null*/,
   val  varchar2(10)
);

create unique index tq84_tab_ix on tq84_tab(id);

alter table tq84_tab add primary key (id);
Or, alternatively…
drop  table tq84_tab;

create table tq84_tab (
   id   number
           constraint tq84_tab_pk primary key
           using index (
             create unique index tq84_tab_ix on tq84_tab(id)
           ),
   val  varchar2(10)
);

Dropping the primary key, but keeping the index

alter table tq84_tab drop constraint tq84_tab_pk keep index;
select * from user_indexes where table_name = 'TQ84_TAB';

Dropping tables referenced by other tables

The cascade constraints clause of the drop table statement allows to drop a table that are referenced by foreign keys of other tables.
Thus, this clause is useful to prevent ORA-02449: unique/primary keys in table referenced by foreign keys error messages.

RELY

By specifiying rely with the primary key, Oracle will trust that the applications modifying the data in the table will only make changes that maintain the unique identifyability of the record.
alter table tq84_table
  add primary key (
    col_one,
    col_two
  )
  rely
  disable;

See also

referential integrity
An SQL statement that finds the primary key columns.
An SQL statement to recursively query referential integrity dependencies.
Identity columns
Automatic assignment for primary key
Using sequences and triggers to provide the values for primary keys.
Column constraint_type (DBA_CONSTRAINTS, ALL_CONSTRAINTS, USER_CONSTRAINTS)
Using all_constraints to show find primary-foreign key relationships.
General notes about primary keys in SQL
The SQL clause exceptions into can be used, for example, when validating a primary key is not possible because uniqueness of the key would be violated, to write the rowids into a specific table in order to then fix the data quality problem.
SQL script to show tables' columns the the position of primary key columns.
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
ORA-02297: cannot disable constraint … - dependencies exist

Index