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)
);
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;