connect '127.0.0.1:/var/db/guest-t2.fdb' user 'SYSDBA' password 'pickfb25' ;



CREATE TABLE MAIL
(
  REF VARCHAR(20),
  SUBJECT VARCHAR(20),
  TYP INTEGER,
  STATUS INTEGER,
  TO_USER VARCHAR(20),
  CC_USER VARCHAR(20),
  FROM_USER VARCHAR(20),
  THREAD VARCHAR(20),
  KEYWORDS VARCHAR(40),
  READSTAMP TIMESTAMP,
  PENDING INTEGER,
  OUTCOME INTEGER,
  IMPORTANCE INTEGER,
  ATTACHMENT VARCHAR(20),
  BRIEF VARCHAR(4000),
  NOTES BLOB SUB_TYPE 1,
  STAMP TIMESTAMP DEFAULT 'now',
  context_1 VARCHAR(20),
  context_2 VARCHAR(20),
  DESTINATION TEXT40
);

CREATE INDEX IDX_MAIL1 ON MAIL (REF);
CREATE INDEX IDX_MAIL2 ON MAIL (FROM_USER);
CREATE INDEX IDX_MAIL3 ON MAIL (TO_USER);

