PROMPT Creating table THREE_LETTER_CARRIER_CODES

CREATE TABLE three_letter_carrier_codes (
   three_letter_carrier_code     CHAR (3)  NOT NULL,
   two_letter_carrier_code       CHAR (3)  NOT NULL,
   prefer_3letter                CHAR (1)  DEFAULT 'N' NOT NULL,
   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 three_letter_carrier_codes add ( constraint three_letter_carrier_codes_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table three_letter_carrier_codes add ( constraint three_letter_carrier_codes_uk1 unique (three_letter_carrier_code) using index tablespace &1._indexes);

COMMENT ON TABLE THREE_LETTER_CARRIER_CODES IS 'This table contains a list of three letter carrier codes and their equivalent two letter codes';

COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.PREFER_3LETTER IS  'Indicates whether to use the two or three letter code';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.THREE_LETTER_CARRIER_CODE IS  'Three letter carrier code';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.TWO_LETTER_CARRIER_CODE IS  'Two letter carrier code';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.CUSER IS 'The user who created the row';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN THREE_LETTER_CARRIER_CODES.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
