Click to See Complete Forum and Search --> : Capture count from UPDATE/DELETE


gopi
07-16-2002, 09:36 AM
(9i, Rel 2, Java Application)

Is there an Oracle construct that captures the count from a previous UPDATE or DELETE statement? (I know that Sybase and SQL Server have such a construct).

One way to do this in an application is to run the same WHERE clause in a SELECT count(*) query. I'd rather not do this.

ales
07-16-2002, 09:45 AM
Is it Java?
Do you use the java.sql.Statement or java.sql.PreparedStatement interfaces?
They have the executeUpdate(String sql) method that returns number of rows affected by INSERT, UPDATE or DELETE statements.

gopi
07-16-2002, 10:12 AM
Yes, we do.

I am the DBA and will forward this link the Java developer who need this.

Thank You!