PROMPT Creating table WAN_CONFIG

CREATE TABLE WAN_CONFIG( 
   site_id                       number(10) not null,
   remote_server                 VARCHAR2(30) not null,
   port                          number(10)   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 wan_config add ( constraint wan_config_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table wan_config add ( constraint wan_config_uk1 unique (site_id) using index tablespace &1._indexes);

alter table WAN_CONFIG add constraint site_id_fk foreign key (site_id) references site_info(site_id);

COMMENT ON TABLE WAN_CONFIG IS 'This table contains details of network connections';

COMMENT ON COLUMN WAN_CONFIG.PORT IS  'Port number';
COMMENT ON COLUMN WAN_CONFIG.REMOTE_SERVER IS  'Remote server name';
COMMENT ON COLUMN WAN_CONFIG.SITE_ID IS  'Site identifier';
COMMENT ON COLUMN WAN_CONFIG.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN WAN_CONFIG.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN WAN_CONFIG.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN WAN_CONFIG.CUSER IS 'The user who created the row';
COMMENT ON COLUMN WAN_CONFIG.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN WAN_CONFIG.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN WAN_CONFIG.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN WAN_CONFIG.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN WAN_CONFIG.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';

