PROMPT Creating table HBMD_INTERIM

CREATE TABLE HBMD_INTERIM ( 
   FLIGHT_ID                     NUMBER (10), 
   FLIGHT_NO                     CHAR (8), 
   FLIGHT_DATE                   CHAR (5), 
   FLIGHT_SCH_TIME               CHAR (4),
   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 hbmd_interim add ( constraint hbmd_interim_pk primary key (appn_row_id) using index tablespace &1._indexes);

COMMENT ON TABLE HBMD_INTERIM IS 'This table contains interim data for HBMDs';

COMMENT ON COLUMN HBMD_INTERIM.FLIGHT_DATE IS  'Flight date';
COMMENT ON COLUMN HBMD_INTERIM.FLIGHT_ID IS  'Flight identifier';
COMMENT ON COLUMN HBMD_INTERIM.FLIGHT_NO IS  'Flight number';
COMMENT ON COLUMN HBMD_INTERIM.FLIGHT_SCH_TIME IS  'Flight scheduled time';
COMMENT ON COLUMN HBMD_INTERIM.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN HBMD_INTERIM.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN HBMD_INTERIM.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN HBMD_INTERIM.CUSER IS 'The user who created the row';
COMMENT ON COLUMN HBMD_INTERIM.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN HBMD_INTERIM.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN HBMD_INTERIM.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN HBMD_INTERIM.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN HBMD_INTERIM.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';

