1、创建测试表,create table test_batch(id number, v_date date)
2、先看插入原始表数据select t.*, rowid from test_day t
3、批量插入测试数据,insert into test_batch select * from test_daycommit
4、查询表的记录,select t.*, rowid from test_batch t可以发现数据一致。批量添加数据完成。
数据源配置1 --><bean id="testDataSource1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="driverClassName" value="${db.driver}" />
<property name="url" value="${unity.db.jdbc.url}" />
<property name="username" value="${db.login.name}"></property>
<property name="password" value="${db.login.password}" />
<property name="filters" value="${db.filters}"></property>
<property name="maxActive" value="${db.pool.maxActive}"></property>
<property name="initialSize" value="${db.pool.initialSize}"></property>
<property name="minIdle" value="${db.pool.minIdle}"></property>
<property name="maxWait" value="${db.maxWait}"></property>
<property name="timeBetweenEvictionRunsMillis" value="${db.timeBetweenEvictionRunsMillis}"></property>
<property name="minEvictableIdleTimeMillis" value="${db.minEvictableIdleTimeMillis}"></property>
<property name="validationQuery" value="${db.validationQuery}"></property>
<property name="testWhileIdle" value="${db.testWhileIdle}"></property>
<property name="testOnBorrow" value="${db.testOnBorrow}"></property>
<property name="testOnReturn" value="${db.testOnReturn}"></property>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)