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" numeric(20) not null
constraint pk_alarmhistory_${stationname}_${yearmonth}
primary key,
"alerttime" timestamp not null,
"messagetype" char not null,
"snapid" numeric(20) not null,
"datainfo" varchar(20),
"alerttextlast" varchar(50)
)
create index IX_AH_${stationname}_${yearmonth}_alerttime on alarmhistory_${stationname}_${yearmonth} ("alerttime")
create index IX_AH_${stationname}_${yearmonth}_snapid on alarmhistory_${stationname}_${yearmonth} ("snapid")