-- Oracle Table Definition
--
-- RCS Revision
--   $Id: followups.oracle,v 1.3 1999/09/20 00:44:16 billf Exp $
--

CREATE SEQUENCE followups_seq START WITH 1;

CREATE TABLE followups (
    x_rowid int DEFAULT 0 PRIMARY KEY,
    f_sid number(10) DEFAULT 0,
    f_date number(10),
    f_tech varchar2(10),
    f_text long, -- Oracle LONG type cannot be indexed or searched!
    f_seq number(10),
    f_public number(10),
    f_usergen number(10),
	f_time number(10)
);

CREATE OR REPLACE TRIGGER followups_trg_bir
BEFORE INSERT ON followups
FOR EACH ROW
BEGIN
    IF :new.x_rowid IS NULL OR :new.x_rowid = 0
    THEN
        SELECT followups_seq.nextval INTO :new.x_rowid FROM dual;
    END IF;
END;
/
