pk_regions.sql

---------------------------------------------------------------------------
-- Filename:    pk_regions.sql
-- Purpose:     Creates the constraints and indexes on table REGIONS.
-- Author:      Chas. Dye (cdye@excitecorp.com)
-- Date:        12-Jan-1998
---------------------------------------------------------------------------
set echo on
set termout on
spool pk_regions.log

ALTER TABLE regions ADD (
CONSTRAINT pk_regions
PRIMARY KEY (region_id)
USING INDEX TABLESPACE sprocket_indx
STORAGE (INITIAL 16K NEXT 16K PCTINCREASE 0)
)
/

ALTER TABLE regions ADD (
CONSTRAINT fk_regions_country_id
FOREIGN KEY (country_id)
REFERENCES countries (country_id)
)
/

CREATE INDEX i_region_country_id ON regions(country_id)
TABLESPACE sprocket_indx STORAGE (INITIAL 16K NEXT 16K PCTINCREASE 0)
/

spool off

Get Oracle Distributed Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.