<?xml version='1.0' encoding='UTF-8'?>
<ROWSET tableName='GE32'>
<EXEC_SQL>
/**************************************************************************/
/* GE32 ( 送信履歴テーブル )                                              */
/*                                                                        */
/* Created : 2012/06/01 18:24:30                                          */
/**************************************************************************/
CREATE TABLE GE32 (
   YKNO      NUMERIC(9)      DEFAULT 0   NOT NULL       
 , PARA_KEY  VARCHAR(9)                                 
 , PTN_ID    VARCHAR(20)                                
 , SYSTEM_ID VARCHAR(10)                 NOT NULL       
 , FROM_ADDR VARCHAR(100)                NOT NULL       
 , TITLE     VARCHAR(300)                               
 , CONTENTS  BLOB                                       
 , ATTACH1   VARCHAR(256)                               
 , ATTACH2   VARCHAR(256)                               
 , ATTACH3   VARCHAR(256)                               
 , ATTACH4   VARCHAR(256)                               
 , ATTACH5   VARCHAR(256)                               
 , UNIQ      BIGINT                      NOT NULL       
 , FGJ       VARCHAR(1)      DEFAULT '1' NOT NULL       
 , DYSET     VARCHAR(14)                                
 , PGSET     VARCHAR(10)                                
 , PGPSET    VARCHAR(10)                                
 , USRSET    VARCHAR(10)                                
 , DYUPD     VARCHAR(14)                                
 , PGUPD     VARCHAR(10)                                
 , PGPUPD    VARCHAR(10)                                
 , USRUPD    VARCHAR(10)                                
)</EXEC_SQL>

<EXEC_SQL>
CREATE SEQUENCE GE32S00 
</EXEC_SQL>


<EXEC_SQL>
CREATE TRIGGER GE32T00 FOR GE32
  BEFORE INSERT 
  AS BEGIN 
    NEW.UNIQ = GEN_ID( GE32S00,1 );
  END; 
</EXEC_SQL>

</ROWSET>
