PROMPT Creating table REFLIGHT_FLIGHT

CREATE TABLE REFLIGHT_FLIGHT ( 
   FLIGHT_ID                     NUMBER(10)	     NOT NULL,
   FLIGHT_NO                     CHAR (8)        NOT NULL, 
   FLIGHT_DATE                   CHAR (5)        NOT NULL, 
   FLIGHT_DEST                   CHAR (3)        NOT NULL,
   SITE_ID                       NUMBER (10)     NOT NULL,
   SCHEDULED_TIME                CHAR (4),
   CARRIER_ALPHA_CODE            CHAR (3),
   DEPARTURE_TIME                DATE,
   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 reflight_flight add ( constraint reflight_flight_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table reflight_flight add ( constraint reflight_flight_uk1 unique (flight_id) using index tablespace &1._indexes);

COMMENT ON TABLE REFLIGHT_FLIGHT IS 'This table contains reflight flight information';

COMMENT ON COLUMN REFLIGHT_FLIGHT.CARRIER_ALPHA_CODE IS  'Carrier code';
COMMENT ON COLUMN REFLIGHT_FLIGHT.DEPARTURE_TIME IS  'Departure time';
COMMENT ON COLUMN REFLIGHT_FLIGHT.FLIGHT_DATE IS  'Flight date';
COMMENT ON COLUMN REFLIGHT_FLIGHT.FLIGHT_DEST IS  'Flight destination';
COMMENT ON COLUMN REFLIGHT_FLIGHT.FLIGHT_ID IS  'Flight identifier';
COMMENT ON COLUMN REFLIGHT_FLIGHT.FLIGHT_NO IS  'Flight number';
COMMENT ON COLUMN REFLIGHT_FLIGHT.SCHEDULED_TIME IS  'Scheduled time of departure';
COMMENT ON COLUMN REFLIGHT_FLIGHT.SITE_ID IS  'Site identifier';
COMMENT ON COLUMN REFLIGHT_FLIGHT.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN REFLIGHT_FLIGHT.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN REFLIGHT_FLIGHT.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN REFLIGHT_FLIGHT.CUSER IS 'The user who created the row';
COMMENT ON COLUMN REFLIGHT_FLIGHT.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN REFLIGHT_FLIGHT.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN REFLIGHT_FLIGHT.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN REFLIGHT_FLIGHT.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN REFLIGHT_FLIGHT.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';

