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` decimal(65,0) NOT NULL, `ALERTTIME` datetime(6) NOT NULL, `MESSAGETYPE` char(1) NOT NULL, `SNAPID` decimal(65,0) NOT NULL, `DATAINFO` text, `ALERTTEXTLAST` varchar(50) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; alter table alarmhistory_${stationname}_${yearmonth} add primary key (`id`) create index IX_AH_${stationname}_${yearmonth}_ALARMTIME on alarmhistory_${stationname}_${yearmonth} (alerttime) create index IX_AH_${stationname}_${yearmonth}_SNAPID on alarmhistory_${stationname}_${yearmonth} (snapid)