insert into ${tbName} (id, alerttime, messagetype,snapid, datainfo)
values
(#{item.id}, #{item.alertTime}, #{item.messageType},#{item.snapId},#{item.dataInfo})
insert into ${tbName} ( ID, ALERTTIME, MESSAGETYPE, SNAPID, DATAINFO,ALERTTEXTLAST)
( select
#{item.id}, #{item.alertTime}, #{item.messageType},#{item.snapId},#{item.dataInfo},#{item.alertTextLast}
from dual )
create table ALARMHISTORY_${stationname}_${yearmonth}
(
ID INTEGER not null,
ALERTTIME DATE not null,
MESSAGETYPE CHAR(1) default '1' not null,
SNAPID INTEGER not null,
DATAINFO VARCHAR2(1000),
ALERTTEXTLAST VARCHAR2(50)
)
tablespace ${tablespace}
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 16K
minextents 1
maxextents unlimited
)
alter table ALARMHISTORY_${stationname}_${yearmonth}
add constraint PK_ALARMHISTORY_${stationname}_${yearmonth} primary key (ID)
using index
tablespace ${tablespace}
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
)
create index IX_AH_${stationname}_${yearmonth}_ALARMTIME on ALARMHISTORY_${stationname}_${yearmonth} (ALERTTIME)
tablespace ${tablespace}
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
)
create index IX_AH_${stationname}_${yearmonth}_SNAPID on ALARMHISTORY_${stationname}_${yearmonth} (SNAPID)
tablespace ${tablespace}
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
)