/******************************************************************************/
/* Generated by IBExpert 26.12.2010 13:51:15 */
/******************************************************************************/
/******************************************************************************/
/* Following SET
SQL DIALECT is just for the Database Comparer */
/******************************************************************************/
SET
SQL DIALECT 3;
/******************************************************************************/
/* Tables */
/******************************************************************************/
CREATE GENERATOR ID;
CREATE TABLE USERLIST (
ID BIGINT NOT NULL,
ANGELEGT DATUMUHRZEIT NOT NULL /* DATUMUHRZEIT = TIMESTAMP */,
BENUTZER VCHAR30 NOT NULL COLLATE DE_DE /* VCHAR30 = VARCHAR(30) */,
SOUNDEX CHAR(6) COLLATE DE_DE
);
/******************************************************************************/
/* Primary Keys */
/******************************************************************************/
ALTER TABLE USERLIST ADD CONSTRAINT PK_USERLIST PRIMARY KEY (ID);
/******************************************************************************/
/* Indices */
/******************************************************************************/
CREATE INDEX USERLIST_IDX1 ON USERLIST (SOUNDEX);
CREATE INDEX USERLIST_IDX2 ON USERLIST (BENUTZER);
/******************************************************************************/
/* Triggers */
/******************************************************************************/
SET TERM ^ ;
/******************************************************************************/
/* Triggers for tables */
/******************************************************************************/
/* Trigger: USERLIST_BIU0 */
CREATE OR ALTER TRIGGER USERLIST_BIU0 FOR USERLIST
ACTIVE BEFORE INSERT OR UPDATE POSITION 0
AS
begin
if (new.id is null) then
new.id = gen_id(id, 1);
if (new.angelegt is null) then
new.angelegt = current_timestamp;
new.soundex = f_soundex(f_upper(new.benutzer));
end
^
SET TERM ; ^