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

CREATE TABLE preferences (
  pref_rowid INTEGER NOT NULL PRIMARY KEY,
  pr_uid VARCHAR(15) NOT NULL,
  pr_tag VARCHAR(30),
  pr_operator VARCHAR(5),
  pr_table VARCHAR(15),
  pr_value VARCHAR(100)
);

CREATE GENERATOR pref_GEN;
COMMIT;

SET TERM !! ;
CREATE TRIGGER pref_row_trigger FOR preferences
ACTIVE BEFORE INSERT POSITION 0
	AS BEGIN
     		NEW.PREF_ROWID = GEN_ID (PREF_GEN, 1);
	END !!
COMMIT WORK !!
SET TERM ; !!
