/*
--	$Id: filters.interbase,v 1.1 1999/06/10 22:44:07 billf Exp $
--
--	Table structure for table 'filters'
*/

CREATE TABLE filters (
  filter_rowid INT NOT NULL PRIMARY KEY,
  uid VARCHAR(20) NOT NULL,
  fdesc VARCHAR(40),
  ftable VARCHAR(10) NOT NULL,
  fpublic INT,
  fselect VARCHAR(200)
);

CREATE INDEX filters_uid_idx ON filters (uid);
CREATE INDEX filters_ftable_idx ON filters (ftable);

CREATE GENERATOR FILTER_GEN;

SET TERM !! ;
CREATE TRIGGER FILTER_row_trigger FOR FILTERS
ACTIVE BEFORE INSERT POSITION 0
	AS BEGIN
     		NEW.FILTER_ROWID = GEN_ID (FILTER_GEN, 1);
	END !!
COMMIT WORK !!
SET TERM ; !!
