tableu_info{
idNUMBER not null,
info_noVARCHAR2(32) not null,
nameVARCHAR2(32) not null,
birthday DATE,
ageNUMBER,
create_date DATEnot null}--自动按天数分区--tablespace TBS_DATA--partition by range (create_date) interval (numtodsinterval(1, ‘DAY‘))--(partition P20190101 values less than (TO_DATE(‘2019-01-01 00:00:00‘, ‘SYYYY-MM-DD HH24:MI:SS‘, ‘NLS_CALENDAR=GREGORIAN‘)))
;--create unique index IU_INFO_NO_DATE on u_info (info_no,create_date) tablespace TBS_IDX online local;
--Add comments
comment on table u_info is ‘用户信息表‘;
commenton column u_info.id is ‘主键‘;
commenton column u_info.info_no is ‘用户编号‘;
commenton column u_info.name is ‘姓名‘;
commenton column u_info.birthday is ‘生日‘;
commenton column u_info.age is ‘年龄‘;
commenton column u_info.create_date is ‘创建时间‘;
二、mybatis xml(传入集合参数,建议批量数量控制在3000以内)
/**UserInfoMapper.insertBatch*/
INSERT INTO u_info(
id,
info_no,
name,
birthday,
age,
create_date
)
SELECT
S.*,
SYSDATE
FROM(SELECT
#{bean.id, jdbcType=DECIMAL},
#{bean.infoNo, jdbcType=VARCHAR},
#{bean.name, jdbcType=VARCHAR},
#{bean.birthday, jdbcType=TIMESTAMP},
#{bean.age, jdbcType=DECIMAL}
FROM DUAL) S
mybatis oracle 批量新增
标签:分区 bat XML ESS sda tis arc local gre
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉
本文系统来源:https://www.cnblogs.com/lidada/p/11384540.html