Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, mangesh.

Asked: January 27, 2017 - 5:51 am UTC

Last updated: January 27, 2017 - 6:50 am UTC

Version: 11gR2

Viewed 1000+ times

You Asked

Hi,

This may sound Java question but I have to ask this. I want to know if there is a way to access sql%rowcount in Java to get no. of rows affected.
My DML statements are native SQL calls from Java and want to know no. of rows affected by DML.

Thanks,
Mangesh


and Connor said...

From the docs:

"the executeUpdate method of an OraclePreparedStatement object returns the number of database rows affected by the operation."

More info here

http://docs.oracle.com/database/121/JJDBC/oraperf.htm#sthref775

Is this answer out of date? If it is, please let us know via a Comment