-- Oracle Table Definition
--
-- RCS Revision
--   $Id: propdisp.oracle,v 1.2 1999/08/18 23:21:02 shevett Exp $
--

CREATE SEQUENCE propdisp_seq START WITH 1;

CREATE TABLE propdisp (
    x_rowid int DEFAULT 0 PRIMARY KEY,
    p_uid varchar2(15) NOT NULL,
    p_flags varchar2(10),
    p_dataset varchar2(10),
    p_column varchar2(15),
    p_order int,
    p_active int
);

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