Create an index, and add primary key to use that index
SQL>
SQL>
SQL> create table inventory(
2 partno number(4),
3 partdesc varchar2(35),
4 price number(8,2),
5 warehouse varchar2(15));
Table created.
SQL>
SQL> Create index invent_part_loc_idx
2 On inventory (partno, warehouse)
3 Pctfree 10;
Index created.
SQL>
SQL> Alter table inventory add (
2 Constraint invent_partno_pk primary key (partno)
3 Using index invent_part_loc_idx);
Table altered.
SQL>
SQL> drop table inventory;
Table dropped.
SQL>
Related examples in the same category