PROMPT Creating table HOLD_CONFIG

CREATE TABLE HOLD_CONFIG( 
   AGENT_CODE                    CHAR(5)      NOT NULL,
   AIRCRAFT_SUBTYPE              VARCHAR2(3)  NOT NULL, 
   CARRIER_ALPHA_CODE            CHAR(3)      NOT NULL,
   POSITION                      CHAR(3) NOT NULL,
   DESCRIPTION                   VARCHAR2(60),
   row_create_time               date,
   row_date_time                 date,
   cuser                         varchar2(30),
   muser                         varchar2(30),
   mterm                         varchar2(64),
   source                        varchar2(8),
   to_be_archived                varchar2(1),
   appn_row_id                   number(18) not null,
   system_id                     number(4) default 0 not null
);

alter table hold_config add ( constraint hold_config_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table hold_config add ( constraint hold_config_uk1 unique (agent_code,aircraft_subtype,carrier_alpha_code,position) using index tablespace &1._indexes);

alter table hold_config add (constraint fk_hc_cl foreign key (carrier_alpha_code) references carrier_lookup (alpha_code));

COMMENT ON TABLE HOLD_CONFIG IS 'Time the row was created';

COMMENT ON COLUMN HOLD_CONFIG.AGENT_CODE IS  'Agent code';
COMMENT ON COLUMN HOLD_CONFIG.AIRCRAFT_SUBTYPE IS  'Aircraft subtype for which the hold is being configured';
COMMENT ON COLUMN HOLD_CONFIG.CARRIER_ALPHA_CODE IS  'Carrier code';
COMMENT ON COLUMN HOLD_CONFIG.DESCRIPTION IS  'Description';
COMMENT ON COLUMN HOLD_CONFIG.POSITION IS  'Hold position';
COMMENT ON COLUMN HOLD_CONFIG.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN HOLD_CONFIG.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN HOLD_CONFIG.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN HOLD_CONFIG.CUSER IS 'The user who created the row';
COMMENT ON COLUMN HOLD_CONFIG.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN HOLD_CONFIG.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN HOLD_CONFIG.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN HOLD_CONFIG.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN HOLD_CONFIG.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
