
可以使用 %rowcount 返回受影响的行数
SQL%rowcount --用户成功提取数据的行数
示例:向表中插入一行数据,询问是否插入成功
declare
iCount int:=0;
begin
insert into place values(2,'beijing');
DBMS_outputput_line('游标所影响的行数:'||SQL%rowcount);
if SQL%NotFount then
DBMS_outputput_line('NotFount为真);
else
DBMS_outputput_line('NofFount为假');
end if;
if SQL%Fount then
DBMS_outputput_line('Fount为真);
else
DBMS_outputput_line('Fount为假');
end if;
if SQL%isopen then
DBMS_outputput_line('isOpen为真);
else
DBMS_outputput_line('isOpen为假');
end if;
isCount:=SQL%rowcount;
DBMS_outputput_line('影响了'||isCount||'行');
end;
java *** 作excel一般都使用poi来完成:
1、下载poi相关jar,maven的集成如下:(把${poiversion}替换成你要的版本)
<dependency><groupId>orgapachepoi</groupId>
<artifactId>poi</artifactId>
<version>${poiversion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>orgapachepoi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poiversion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>orgapachepoi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poiversion}</version>
<scope>provided</scope>
</dependency>
2、根据poi相关api读取sheet、row、cell,获得excel的数据:
封装row的对象,即每一行数据为一个对象,每个cell为对象里的一个属性,
整个sheet的数据装进集合里;
3、处理数据,可以对数据进行验证或其他 *** 作;
4、写数据库 *** 作。
以上就是关于怎样用JAVA把20万记录的SQL2000中的表转化成ORACLE表全部的内容,包括:怎样用JAVA把20万记录的SQL2000中的表转化成ORACLE表、java 怎么从excel文件导入到oracle数据库中、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)